GhettoP 0 Posted November 17, 2001 Ok. I have a mission where I first go into an enemy controlled area and destroy all the enemy forces. Once that First objective is completed, the trigger triggers enemy reinforcements to come in. The enemy reinforcements are a total of three groups. Each group is a mechanized infantry squad. I have each group labled grp20, grp21, and grp22. The Second objective of the mission is to destroy the enemy counterattack. I have the following sensor to detect this objective: class Item7 { position[]={8165.000000,8.000000,3160.000000}; age="UNKNOWN"; expCond="((""fleeing _x"" count units grp20) + (""not alive _x"" count units grp20)) == count units grp20; ((""fleeing _x"" count units grp21) + (""not alive _x"" count units grp21)) == count units grp21; ((""fleeing _x"" count units grp22) + (""not alive _x"" count units grp22)) == count units grp22"; expActiv="L6 globalchat ""Objective 2 is Completed""; ""2"" objstatus ""DONE""; objective2=true"; class Effects { }; synchronizations[]={}; }; The problem I am having is that when just ONE of the groups are destroyed, it says the objective is complete but I want it to be complete when ALL of the groups are destroyed. Anybody know how I can make a sensor which will be triggered when ALL three of the groups are destroyed? Please let me know. Thanks Share this post Link to post Share on other sites
vitoal125 0 Posted November 17, 2001 Make three triggers, each like that one you have there. And when they fire have grp1dead=true. and 2 and 3 in those triggers. then have a fourth trigger with the condition of grp1dead and grp2dead and grp3dead that has the on activation of doing the objective complete. Share this post Link to post Share on other sites
Chris Death 0 Posted November 17, 2001 Why you makin the asking in your trigger so complex? Tell me more, does the mission continue after that? could it be enough if you only ask for east present in the specified area? Remember not present means dead or retreated (at least from that area). vitoal is also right, with makin 3 triggers and sending 3 conditions (like a,b,c all true) to the fourth trigger, where in the condition field would be: a and b and c Share this post Link to post Share on other sites
Chris Death 0 Posted November 17, 2001 expCond="((""fleeing _x"" count units grp20) + (""not alive _x"" count units grp20)) == count units grp20; ((""fleeing _x"" count units grp21) Also a mistake i found is: you have to use the "and" instead of the ";" in the condition field. The ";" indicates that the command ends here, the "and" indicates, that there is another condition needed too. Share this post Link to post Share on other sites
GhettoP 0 Posted November 17, 2001 Ok thanks guys. Â I'm going to try what you guys said to do. Â I'll test the mission in the morning and I'll let ya'll know if it worked or not. Â Seems like it should work. Â Anyways, my mission does end after that second objective. Â I have a trigger that if Objective 1 and 2 are completed, the mission ends and is accomplished. Â I don't know if it works yet though. (Edited by GhettoP at 7:56 am on Nov. 17, 2001) Share this post Link to post Share on other sites
GhettoP 0 Posted November 17, 2001 Ok. I got it to work...... Share this post Link to post Share on other sites
nutbar 0 Posted November 18, 2001 Not to sound dumb, but your problem was the semi colons in your condition test. You want AND's, not separate tests (they act as an OR... if it actually accepted it without an error of an invalid condition). Anyways, no need to test the fleeing thing, just do: ("alive _x" count units grp20) + ("alive _x" count units grp21) + ("alive _x" count units grp22) == 0 For your test. When everyone is dead, it triggers and voila. Programming skills rule! Share this post Link to post Share on other sites