Duke101 18 Posted November 25, 2014 Hello, I have a stealth type mission where if blufor are detected and within a certain time i.e. if the players don't klill the enemy units within this time (using timeout), an alarm goes off and this means essentially that the enemy would've had the chance to radio friendly units. I also have a hunt script spawned which tracks the players when this trigger condition is met... But I want is all opfor units to go from safe to aware (or perhaps combat), under the assumption that they now know there are enemies out there somewhere. Basically, all this is the cost of not being stealthy enough or not being able to eliminate the enemy, once detected quick enough. If that makes sense? I've tried this on act: {if (side _x == opfor) then { setBehaviour "aware" )} forEach allUnits; and a few other variations, but can't it to work...doing my head in now ! I know I'm pretty close. Can someone help me please. Thanks. Share this post Link to post Share on other sites
dreadedentity 278 Posted November 26, 2014 Formatting is important { if (side _x == opfor) then { setBehaviour "aware"; //you put a closing parenthesis here instead of a semicolon }; //didn't close the if statement } forEach allUnits; Share this post Link to post Share on other sites
Heeeere's johnny! 51 Posted November 26, 2014 (edited) Formatting is important { if (side _x == opfor) then { setBehaviour "aware"; //you put a closing parenthesis here instead of a semicolon }; //didn't close the if statement } forEach allUnits; What's still needed though is whos behaviour you set, of course that of _x: { if (side _x isEqualTo opfor) then //isEqualTo is about two times faster than "==", but it compares more strictly, { //like for strings it distinguishes upper and lower case letters _x setBehaviour "aware"; }; } forEach allUnits; Edited November 26, 2014 by Heeeere's Johnny! Share this post Link to post Share on other sites
Duke101 18 Posted November 26, 2014 Thanks DreadedEntity. Yeah, I sometimes get in a muddle with my formatting and miss the obvious. But I'm learning all the time. Thanks, this is appreciated. ---------- Post added at 01:44 ---------- Previous post was at 01:41 ---------- What's still needed though is whos behaviour you set' date=' of course that of [i']_x[/i]: { if (side _x isEqualTo opfor) then //isEqualTo is about two times faster than "==", but it compares more strictly, like for strings it distinguishes upper and lower case letters { _x setBehaviour "aware"; }; } forEach allUnits; Thanks Johnny ! Makes sense. Much appreciated. :) Share this post Link to post Share on other sites