Skip to content

Instantly share code, notes, and snippets.

@jameslkingsley
Created February 4, 2016 15:47
Show Gist options
  • Save jameslkingsley/452f3693be64da1772c6 to your computer and use it in GitHub Desktop.
Save jameslkingsley/452f3693be64da1772c6 to your computer and use it in GitHub Desktop.
/*
Default jog: AmovPercMrunSlowWrflDf 1.396s
Sprint: AmovPercMevaSlowWrflDf 0.621s
*/
_handle = _this spawn {
private ["_unit", "_dest"];
_unit = _this select 0;
_dest = _this select 1;
while { (_unit distance _dest) > 1 } do {
if ((_unit distance _dest) <= 1) exitWith {
// Unit has reached their destination
};
_suppression = getSuppression _unit;
if (_suppression >= 0.2) then {
_unit playMove "AmovPercMevaSlowWrflDf";
sleep 0.621;
} else {
_unit playMove "AmovPercMrunSlowWrflDf";
sleep 1.396;
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment