Tutorials

Triggering Zones by Controlled Character Only

by phosita83 (PM)

See everything made by this user or team.

Current Language: English
Not enough votes.

1.
Make a variable called "controlled_character".
Make a variable called "who_touched_the_zone".  Save the variables.

Create a custom event called "Controlled Zone Activation".  Save the custom event.

 

2.
In switch-character input scripts (both "previous" and "next"), make a multi-comparison branch with the expression being mainparty->"controlled party member". For each outcome change controlled_character value to who you switched to (e.g. 0 for billy, 1 for mary, 2 for pete).

 

3.
In the Controlled Zone Activation custom event, put a multi-comparison branch with the expression being character->name->relate, and the values as P0, P1, P2, etc.
For each outcome, make a variable operation, and set "who_touched_the_zone" according to the related values, so 0 for P0, 1 for P1.

 

4.
Connect all of the variable operation in step 3 to a single comparison branch with the expression being  "main_character", set the operator to "equal" and set the value to the variable "who_touched_the_zone".
 

5.

Under the "equal to" (left) branch, add a "return value" event and set it to 1.  Under the "not equal to" (right) branch, add a "return value" event and set it to 0.

 

6.

In the zone "touched by playable character" trigger,  put in the custom event that you made.  Under that, make a comparison branch with the expression being the custom event that you made.  Set the operator to "equal" and Set the value to 1.  Under the "equal to" (left) branch, add all the events that you want your zone to trigger.  Leave the "not equal to" side free.

 

Note:  Now for every zone you make, you only have to repeat step 6.

There's been a total of 1659 views(s).
There's been 1005 people that have viewed.