Jump to content
Sign in to follow this  
Billabong81

Multiple Groups Activating Trigger

Recommended Posts

I have made a mission where one of the objectives is to defend a town the character is defending. I want the objective to tick off once all 3 of the attacking groups have been killed. They are named gr1, gr2, and gr3. I have tried putting the following in the condition field, but it did not work:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this AND gr1dead AND gr2dead AND gr3dead

It didn't work though sad_o.gif. Any other ideas?

Share this post


Link to post
Share on other sites

1 trigger set to gamelogic.

type: end#1

condition:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">not alive gr1 && not alive gr2 && not alive gr3

I think that should work. smile_o.gif

p.s. typing from work so don't kill me if it doesn't work straight away. It should as i am using lotsa stuff like that trigger you need.

Share this post


Link to post
Share on other sites

That doesn't work because these are groups. The not alive command can only be used for objects wink_o.gif. Thanks though.

Share this post


Link to post
Share on other sites

Do it like this

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"alive _x" count units gr1 == 0 && "alive _x" count units gr2 == 0 && "alive _x" count units gr3 == 0

That works for sure, however some script wizard must know some better way to check all groups. That is somewhat copy-paste method smile_o.gif

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"alive _x" count ((units gr1) + (units gr2) + (units gr3))== 0

That is a slightly shorter method.

RED

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  

×