Created
February 4, 2016 18:51
-
-
Save jameslkingsley/83b95adc51d2e0ed4495 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
//_x disableAI "MOVE"; // Disables move to enable animations | |
[_x, _grp, _cover] spawn { | |
PARAMS_3(_x,_grp,_cover); | |
while {(_x distance _cover) > 1} do { | |
_coverdir = [(getpos leader _grp), getpos _cover] call BIS_fnc_dirTo; | |
_grp setFormDir _coverdir; | |
_x setDir _coverdir; | |
_sup = getSuppression _x; | |
if (_sup > 0.2) then { | |
_x playMove "AmovPercMevaSlowWrflDf"; // Sprint | |
diag_log format ["FUNC: MOVE TO COVER - %1 is now sprinting!", _x]; | |
sleep 0.621; | |
} else { | |
_x playMove "AmovPercMrunSlowWrflDf"; // Jog | |
diag_log format ["FUNC: MOVE TO COVER - %1 is now jogging!", _x]; | |
sleep 1.396; | |
}; | |
}; | |
//_x enableAI "MOVE"; | |
}; | |
} forEach (units _grp); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment