Billabong81 0 Posted June 8, 2005 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 . Any other ideas? Share this post Link to post Share on other sites
Warrior Xâ„¢ 0 Posted June 9, 2005 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. 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
Billabong81 0 Posted June 9, 2005 That doesn't work because these are groups. The not alive command can only be used for objects . Thanks though. Share this post Link to post Share on other sites
Warrior Xâ„¢ 0 Posted June 9, 2005 Crap i knew that would be a problem lol. I'll check it out when i get home from work eheh. Share this post Link to post Share on other sites
Snake Man 402 Posted June 9, 2005 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 Share this post Link to post Share on other sites
RED 0 Posted June 9, 2005 <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
Billabong81 0 Posted June 9, 2005 Thanks Snake/Red. That method works perfectly . Share this post Link to post Share on other sites