[cec].blindman 10 Posted March 20, 2017 Good day community! I'm having trouble with a string of code. In a MP mission, where the guys need to rescue several hostages, added a addaction so that any one of them could addgroup the hostages and swap leadership if needed. Problem is the animation. I can use the code without it, but I want to add just a little more flare to it. this disableAI "move"; this disableAI "fire"; this setcaptive true; this setunitpos "middle"; this addaction ["Follow me!",{[captive1] join (_this select 1); captive1 setcaptive false; captive1 setunitpos "auto"; captive1 enableAI "Move"; captive1 enableAI "fire"; }]; Now the problem, I know how to make the AI surrender by adding the playmove. captive1 playmove "AmovPercMstpSsurWnonDnon"; this disableAI "move"; this disableAI "fire"; this setcaptive true; this setunitpos "middle"; this addaction ["Follow me!",{[captive1] join (_this select 1); captive1 setcaptive false; captive1 setunitpos "auto"; captive1 enableAI "Move"; captive1 enableAI "fire"; }]; I can't figure out how to cancel the playmove after addaction is used. Any help? Share this post Link to post Share on other sites
phronk 895 Posted March 20, 2017 You can add captive1 disableAI "ANIM"; after the unit plays the animation to prevent him from changing to another animation. This might be handy also: captive1 action["surrender",captive1]; Share this post Link to post Share on other sites
[cec].blindman 10 Posted March 20, 2017 3 hours ago, phronk said: You can add captive1 disableAI "ANIM"; after the unit plays the animation to prevent him from changing to another animation. This might be handy also: captive1 action["surrender",captive1]; That's the problem, I don't want him to be stuck in surrendered animation. I want him to go back to default behavior after a player uses addaction on him. Share this post Link to post Share on other sites
phronk 895 Posted March 20, 2017 Then simply execute this upon use of the addAction:captive1 enableAI "ANIM"; Share this post Link to post Share on other sites