plugger 0 Posted February 6, 2011 G'day, I have several AI snipers in a mission manning rooftops. Because of the variable entry points of the player controlled units I end up with situations where the snipers are looking in the wrong direction. How do I get the snipers to 'scan around', eg. continuously search all around ? Thanks in advance. Cheers, Plugger Share this post Link to post Share on other sites
f2k sel 164 Posted February 7, 2011 I use this, mostly for search lights or mounted MC guns but it will work for simple units. // Obj is the units name who will search; // Deg is the area that the unit will search 0 - 359; // null=[obj,deg] execVM "movegunner.sqf" // By F2kSel //if (!isServer) exitWith {}; _unit = _this select 0; _deg = _this select 1; _face = getdir _unit; _gman = (gunner (vehicle _unit)); while {(alive _gman) && (alive _unit)} do { _gman setformdir _face+((random -(_deg)+(_deg/2))); sleep (random 6)+2; }; Share this post Link to post Share on other sites
plugger 0 Posted February 7, 2011 G'day, Does the job! Much appreciated. Thanks, Plugger Share this post Link to post Share on other sites