Jump to content
Sign in to follow this  
Fearmonge

Multiple targets need to be killed for a trigger

Recommended Posts

I've looked around and couldn't find anything about this so I'm posting this question. I'm sorry if the answer is easy but I'm not sure how to do it. Here's what I'm trying to do. I have (6) targets (target1-target6) when all six of them are killed I would like to have a trigger started for a group of troops come moving into town. I know how to do this we 1 target (!alive target1;) and was hopping there was a way to do it without having to make a trigger for each target. I've got the targets and the replacement troops all setup with waypoints. Again it works fine with 1 target but trying to do it for the 6 I don't know how to set that. Thanks in advance for the help.

Fearmonge

Share this post


Link to post
Share on other sites

!(alive target1) and !(alive target2) and !(alive target3) and !(alive target4) and !(alive target5) and !(alive target6)

Share this post


Link to post
Share on other sites

Thank you very much. Now what if I wanted to set it up were only 3 of them or 50% had to be killed to start the trigger. Any random 3 of the 6? Thanks again.

Share this post


Link to post
Share on other sites

Celery that did it great thank you very much. This might sound a little strange but can you kind of explain what the code is saying. I've always had trouble understanding code.

Share this post


Link to post
Share on other sites
Celery that did it great thank you very much. This might sound a little strange but can you kind of explain what the code is saying. I've always had trouble understanding code.

It counts how many units in the array meet the condition in the {} brackets with _x being each unit in the array. If it's less than 4, the trigger's condition is met.

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  

×