kremator 1064 Posted September 18, 2016 Hey guys, Getting on quite well tinkering with the insurgency mission (combined with madcheese's C2 mod makes it brilliant) but I want to add further scripting to my automagic medics - they autorevive and autoheal. When a group member gets hits (doesn't matter if it hurts or kills them) the medics are given a doMove command to the injured soldier. However, if they were ALREADY on a move command (can check via currentCommand "MOVE") then I want them to resume to where I had already sent them! I've been playing around with the coding but wrapping myself in knots - I can't code, only tinker :) I've looked at the biki but am finding it tougher than it should be. Anyone able to help with a code snippet or two that will help my medics get back ontrack? Share this post Link to post Share on other sites
Larrow 2801 Posted September 19, 2016 Maybe either of these.. if !( currentCommand _unit == "MOVE" ) then { //Do new move }; if ( unitReady _unit ) do { //Do new move }; Share this post Link to post Share on other sites
kremator 1064 Posted September 19, 2016 Thanks Larrow, but I'm trying to capture the location of where they had been sent to (before I rudely interrupt them and give them another job first :) ) Share this post Link to post Share on other sites
fn_Quiksilver 1633 Posted September 19, 2016 i haven't had much luck with expecteddestination. setvariable/domove/moveto/unitready are commands that help. Share this post Link to post Share on other sites
Tajin 348 Posted September 19, 2016 If all else fails, I would just check "stopped" and "formationLeader". If your medic is stopped, then just send him back to his original location after doing his thing. Otherwise store the "formationLeader" and then issue a "doFollow". I guess that should suffice for most situations. Share this post Link to post Share on other sites