DasClark 10 Posted August 10, 2013 Heyas Hive Brain, I am new new scripter and am loving what I can do. But I have hit a snag. I am trying to get a simple little script set up that detects when a person gets in a helicopter. At that point, the ground crew will move away from the chopper and salute the chopper. Here is the little snippet I have so far... _saluteMe = { hint "Player Entered LilBird1\n"; _unit = _this select 0; _mech1 = lil1Rep1; _mech1 enableAi "MOVE"; sleep 1; _mech1 setUnitPos "Up"; sleep 2; _mech1 doMove getMarkerPos "mech1WaitMarker"; sleep 8; _mech1 setdir 330; _mech1 switchMove "AmovPercMstpSlowWrflDnon_Salute"; sleep 3; //_mech1 disableAi "MOVE"; }; call _saluteMe; The crewman (_mech1) starts with disableAI "MOVE" and setUnitPos "Middle". Everything works except for the move command. The crewman stands up, waits a bit, then faces the right direction and salutes but he never moves. what am I missing with the doMove? thanks DasClark ps - there is a marker in the game that is called mech1WaitMarker ---------- Post added at 03:13 ---------- Previous post was at 03:10 ---------- Sorry to tag onto my own question with another one, but is there a better way to deal with the delay between commands other then sleep? thanks yet again. DasClark Share this post Link to post Share on other sites
DasClark 10 Posted August 10, 2013 no traffic on this one? lil help here gang. Share this post Link to post Share on other sites
DasClark 10 Posted August 14, 2013 Lil help please. Share this post Link to post Share on other sites
kylania 568 Posted August 14, 2013 // called via: // 0 = [driver bird, lil1Rep1] spawn saluteMe; // needs to be spawn since you're using sleep in it. Also no _ so triggers can call it. saluteMe = { hint "Player Entered LilBird1\n"; _unit = _this select 0; _mech1 = _this select 1; _mech1 enableAi "MOVE"; sleep 1; _mech1 setUnitPos "Up"; sleep 2; _mech1 doMove getMarkerPos "mech1WaitMarker"; sleep 8; group _mech1 setBehaviour "CARELESS"; // supposed to be needed for salute to hold, but use disableAI anyway later sleep 1; _mech1 setdir 330; _mech1 action["Salute", _mech1]; _mech1 disableAi "ANIM"; // Wait till the pilot is 5m up waitUntil {(getPos vehicle _unit select 2) > 5}; // Drop salute _mech1 enableAi "ANIM"; // Wait x seconds and delete the poor guy. sleep 30; deleteVehicle _mech1; }; Share this post Link to post Share on other sites
DasClark 10 Posted August 14, 2013 You sir, are an officer and a ninja. Friggin brilliant! thanks DasClark Share this post Link to post Share on other sites