swift39 1 Posted September 30, 2018 Just a quick question... Is there a way after setting a new direction of AI to return to their original position? I am using getDirVisual for an official they turn and face as he walks by _dir = getDirVisual _official; //Find the direction of the official then execute it _x disableAI "ANIM"; _x setDir _dir; _x lookAt _official; which works, but when released from the script they continue their animation in the "new" direction which is messing things up. What I would like to do is save the AI's original position then change direction during the script, then upon completion return to original direction and animation. Hope this makes sense Cheers Greg Share this post Link to post Share on other sites
gc8 977 Posted October 1, 2018 I would try spawning a script that has small delay and waits for the unit to stop and then set the direction and animation. something like: [_unit] spawn { params ["_unit"]; sleep 2; waituntil { (abs (speed _unit)) < 0.1 }; // Set anim and direction here }; Share this post Link to post Share on other sites
Harzach 2518 Posted October 1, 2018 Get the position and direction of the unit and store it first? Share this post Link to post Share on other sites
swift39 1 Posted October 2, 2018 Thanks to you both, I was overthinking this I just had to place the getDir before disableAI and it works fine or as well as the AI will let you. Cheers Greg orgPos = getDir _x; _x disableAI "ANIM"; _x setDir _dir; _x lookAt _official; Share this post Link to post Share on other sites