Jump to content
Sign in to follow this  
corralesid

Who triggers a trigger?

Recommended Posts

Does anyone knows the return function for a trigger, i mean, who was the first to activate a trigger. I guess i could use thislist and override my question for an index 0, but this will not work for thext scenario:

 

I have a BLUE unit that will execute the trigger only when he detects an INDEPENDENT (just WEST unit has setfriend hostile to INDEPENDENT cause otherwise it will not work), therefore i can have multiple units in thisList but i can't use the index cause it will return the first unit in the list instead of the first unit detected, by the way the BLUE is set for not shooting (training purpose). I think the key is from an EventHandler that should return who activates the trigger, i try to remember where do i see this but can't remember and any help will be helpful to solve this issue. 

Share this post


Link to post
Share on other sites

Filter thisList so you have an array of BLUFOR and an array of Independent with forEach and side then use knowsAbout or targetKnowledge to compare their information and determine if they know about each other then execute according with an "if () then {};" code block.

  • Like 1

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  

×