Forum rules - please read before posting.

How to get a trigger to affect the correct character?

edited January 2019 in Technical Q&A

Hello again :)

Let's say there's a part of the scene where whomever is standing there should now use a different sorting map. I now use a Trigger and use the "Character:Change rendering"->"Sorting map:Set" to a non default SortingMap. Two problems arises:

  1. Sometimes the player should be the one to follow a new Sorting Map, and sometimes it's an NPC. Let's say the player walks into the trigger while the NPC is standing outside the trigger - now the player should be the one affected but not the NPC. Now let's say it's the other way around - now the NPC should be affected and not the Player. Would it perhaps be possible to get the character that entered the trigger as a parameter into the "Character:Change rendering" action, so the character to affect can be determined? Or is there some other solution that I am not seeing?

  2. If player switching is enabled and two players are standing inside the trigger area, the active player get's the correct Sorting Map but the associated NPC (that was previously the active player) always gets the default Sorting Map.

Thanks!

Comments

  • Would it perhaps be possible to get the character that entered the trigger as a parameter into the "Character:Change rendering" action, so the character to affect can be determined?

    Yes - if the Trigger's first parameter is a GameObject, you can check Set collider as parameter? to set it automatically.

    If player switching is enabled and two players are standing inside the trigger area, the active player get's the correct Sorting Map but the associated NPC (that was previously the active player) always gets the default Sorting Map.

    Yes, this is something I've been thinking about. I will see what can be done.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.