Jump to content
Sign in to follow this  
arthur666

How to activate trigger with specific unit(s)

Recommended Posts

I searched a little but am still not sure how to do this. I want a switch trigger to activate when any of a group of units enter it. Lets say I have units named BTR1, BTR2, and BTR3. What would I type in the conditions box if I wanted any of these to activate the trigger if the entered it? And what other settings up top should I use?

Share this post


Link to post
Share on other sites
Group the trigger and the group leader.

They're not in the same group.

Share this post


Link to post
Share on other sites

thats actually quite a good question because you cant group it to more than one group :)

i be interested to hear the answer to this myself

Share this post


Link to post
Share on other sites
btr1 in thislist || btr2 in thislist || btr3 in this list || brt4 in thislist

Share this post


Link to post
Share on other sites
btr1 in thislist || btr2 in thislist || btr3 in this list || brt4 in thislist

That code would go into your condition box :)

Share this post


Link to post
Share on other sites

Cool.

So || means "or"? If I wanted all of those units to be present, not just any in order to activate the trigger, what would I use?

Share this post


Link to post
Share on other sites

then use && (and):

btr1 in thislist && btr2 in thislist && btr3 in thislist

Edited by Wraith_V

Share this post


Link to post
Share on other sites

What if I wanted and Object and the Player inside the triggerzone to activate the trigger?

Share this post


Link to post
Share on other sites
What if I wanted and Object and the Player inside the triggerzone to activate the trigger?

trigger anyone present.

cond:

objectName in thisList AND unitName in thisList

Share this post


Link to post
Share on other sites
trigger anyone present.

cond:

objectName in thisList AND unitName in thisList

It's not working. I have an ammo crate that can appear in 3 random places the player has to find that crate to end his task.

So I placed a triggerzone upon the 3 locations where the crates can appear en used this code

Crate in thisList && Player in thisList 

Share this post


Link to post
Share on other sites
It's not working. I have an ammo crate that can appear in 3 random places the player has to find that crate to end his task.

So I placed a triggerzone upon the 3 locations where the crates can appear en used this code

Crate in thisList && Player in thisList 

this works:

unitname in thisList and (unitname distance objectname) < 5

means that when unit named unitname is inside trigger and is less than 5 meter away from the crate named objectname

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  

×