Jump to content
Sign in to follow this  
TheJokerMan

how do link 1 trigger to 3 groups

Recommended Posts

hi... sad_o.gif i need help, ok i have 3 groups with playable units in them, so i want the end trigger to be activated by any member of any of the 3 groups? i know how to do that with 1 group, but it would seem that you can only link 1 group and 1 trigger. so is there an easy way to do this? or would i have to make 3 indentical triggers and just link them all seperatly?

Share this post


Link to post
Share on other sites

Have a game logic gl_area (or some named object) to mark the center of the area and a looping script like:

<span style='color:blue'>_object = gl_area

_detectradius = 20

_detectunits = units g_alpha + units g_bravo + units g_charlie

area_x = false

publicvariable "area_x"

#waitforunit

?"_x distance _object < _detectradius" count _detectunits > 0 : goto "unitpresent"

~2

goto "waitforunit"

#unitpresent

area_x = true

publicvariable "area_x"

exit</span>

In the three group leaders' init lines:

g_alpha = group this

g_bravo = group this

g_charlie = group this

Then the condition of the trigger you want to activate:

area_x

Share this post


Link to post
Share on other sites

...or do this:

Quote[/b] ]make 3 indentical triggers and just link them all seperatly

Share this post


Link to post
Share on other sites

But won't three end1 triggers create an AND combination of all three conditions?

Share this post


Link to post
Share on other sites

Yeah, didn't realise that. Just have one end#1 trigger waiting for a variable and set that variable in each detection trigger, like end_mission = true or something.

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  

×