Jump to content
Sign in to follow this  
Pundaria

umm.... how to make a trigger triggerred by a certain % of surviver

Recommended Posts

as mentioned

The case is, I want an army to evacuate from an area and the % survived is checked when they reach their destination. For all, some or none make it to the evacuation pt., will trigger different trigger. How could I mod the % of survivers in a group to be checked by a trigger?

Edited by Pundaria

Share this post


Link to post
Share on other sites

Firstly, when do you want to activate the trigger? Only when every single survivor is at the evac pt? Are the units to evac all part of the same group? If not originally, do you want to add them all to the same group when the evac begins? That can make life easier.

The simplest is to set a trigger so that every member of the group must be in the trigger zone. Obviously dead people aren't expected to be able to move around, so that will automatically match every survivor of the group. You can then make the trigger run different code (in the 'on act') depending on how many people are in the group (count thisList).

Alternatively, you can make several triggers and have the condition something like:

this and (count thisList > 5) and (count thisList < 10)

as an example.

But you do need to make sure you clearly define when the trigger should be activated. Just doing the second example above (with multiple triggers with different counts) can mean if a lot of people survive, you'll activate the "some survivors" trigger and then a bit later run the "all survivors" trigger when more of the people show up. Depending on what the triggers do that might be okay, but usually you only want to run one.

Edited by some kind of guy
Fixed errant [code] tag

Share this post


Link to post
Share on other sites
Firstly, when do you want to activate the trigger? Only when every single survivor is at the evac pt? Are the units to evac all part of the same group? If not originally, do you want to add them all to the same group when the evac begins? That can make life easier.

The simplest is to set a trigger so that every member of the group must be in the trigger zone. Obviously dead people aren't expected to be able to move around, so that will automatically match every survivor of the group. You can then make the trigger run different code (in the 'on act') depending on how many people are in the group (count thisList).

Alternatively, you can make several triggers and have the condition something like:

[code[this and (count thisList > 5) and (count thisList < 10)[/code]

as an example.

But you do need to make sure you clearly define when the trigger should be activated. Just doing the second example above (with multiple triggers with different counts) can mean if a lot of people survive, you'll activate the "some survivors" trigger and then a bit later run the "all survivors" trigger when more of the people show up. Depending on what the triggers do that might be okay, but usually you only want to run one.

yo, buddy. thx:yay:

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×