Jump to content
Sign in to follow this  
Bahger

Presence trigger: How can I restrict this SPECIFIC Blue units?

Recommended Posts

I want a "Blue Present" trigger to fire, but only when one of two units are present, not ANY Blue unit. Let's say I name two troop transports Truck01 and Truck02. What syntax do I use in the trigger's activation field with (with "Activated by Blue" and "Blue Present" set) in order to get the trigger to fire ONLY when one OR the other of these units is present? Many thanks, as ever.

Share this post


Link to post
Share on other sites

you need to set the condition to return true when either specified unit is in the variable thisList. so your condition would be something to the effect of

this && (Truck01 in thisList) || (Truck02 in thisList)

Trigger Conditions -

The trigger will activate when this script code block returns true. If you leave the Condition box blank, the trigger will never activate. Within this block this refers to a boolean defined by whether the conditions chosen within the Activation options above are currently true or false, and thisList (or list <this trigger's name>) refers to an array of objects that are currently inside the trigger area and satisfy the trigger's Activation conditions, and thisTrigger refers to the trigger itself.

(Mission Editor - Triggers)

Edited by dr_strangepete

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  

×