PDA

View Full Version : question about triggers and effects


samedi
09-01-2009, 04:14 PM
Hello i have a problem on the gem editor, for example i want a trigger that says "if this unit is to die then this squad should come to replace them, i put the reinforcement squad a tag and "hidden" but i dont know the condition i need to put in that says if this unit is to die then this squad move to replace them and if that squad is to die an exact replicate of that squad should replace them please help me

samedi
10-10-2009, 09:46 PM
ok i take it no one here knows about triggers and how to use them

Manic_Mechanic
10-31-2009, 12:08 AM
The condition you're looking for is entities. You cas use the feilds to narrow what entities the condition looks for. The easiest way to do what you're talking about is to tag all the members of the squad and choose the tag in the "entities" command.


Next you need to choose a state. In this case I'm pretty sure you're looking for dead. Set the "count" option to the equals sign and the "value" to the number of men in your squad. Now, when all the men are dead, the condition will be met and the trigger will activate.


If you want this replacement squad to be replaced in turn if they die too, you'll need to use a pair of "entity_state" commands in the trigger, one to remove the tag from the dead squad and the second to give that tag to this new squad. Then add a "trigger" command so that the trigger will turn it'self off after it activates, allowing it to be activated again after the new squad dies.

Hope that helps, just let me know if you have any other questions or need clarification on something.

samedi
11-06-2009, 11:12 PM
thanks so much

Manic_Mechanic
11-10-2009, 04:45 AM
No problem. Just post if you have any other questions. :grin: