Just looked at this thread and saw a animation loop method.
Tried the waitUntil that was there, and it works pretty well!
I'm almost done.. Is there a way to find the behavior of a unit? I tried using " "CARELESS" = Behaviour _man ", but it wasn't working. Sorry for all the questions, still trying to grip on thisCode:private["_man"]; _man = _this select 0; While { alive _man } do {// && !(animationState _man == _Anim) _Anim = [ "AidlPercMstpSlowWrflDnon_i02", "AidlPercMstpSlowWrflDnon_i04", "AidlPercMstpSlowWrflDnon_i05", "AidlPercMstpSlowWrflDnon_i06", "AidlPercMstpSlowWrflDnon_i07", "AidlPercMstpSlowWrflDnon_i08", "AidlPercMstpSlowWrflDnon_i09", "AidlPercMstpSlowWrflDnon_i10", "AidlPercMstpSlowWrflDnon_i11", "AidlPercMstpSlowWrflDnon_i12", "AidlPercMstpSlowWrflDnon_i13", "AidlPercMstpSrasWrflDnon01", "AidlPercMstpSrasWrflDnon02", "AidlPercMstpSrasWrflDnon03", "AidlPercMstpSrasWrflDnon04", "AidlPercMstpSrasWrflDnon05", "AidlPercMstpSrasWrflDnon06", "AidlPercMstpSrasWrflDnon_i01", "AidlPercMstpSrasWrflDnon_i02", "AidlPercMstpSrasWrflDnon_i03", "AidlPercMstpSrasWrflDnon_i04", "AidlPercMstpSrasWrflDnon_i05", "AidlPercMstpSrasWrflDnon_i06", "AidlPercMstpSrasWrflDnon_i07", "AidlPercMstpSrasWrflDnon_i08", "AidlPercMstpSrasWrflDnon_i09", "AidlPercMstpSrasWrflDnon_i10", "AidlPercMstpSrasWrflDnon_i11", "AidlPercMstpSrasWrflDnon_i12", "AidlPercMstpSrasWrflDnon_i13" ] call BIS_fnc_selectRandom; if !(animationState _man == _Anim) then { hint "!= _Anim"; _man switchMove _Anim /**_man switchMove "AidlPercMstpSrasWrflDnon_i13"*/}; if (animationState _man == _Anim) then { hint format["Playing animation %1", _Anim]; waitUntil {!(animationState _man == _Anim)}; }; //hint format["Playing animation %1", _Anim]; sleep 0.2; };
Edit: Just saw your post muzzle, gonna try it now!
HOME
Reply With Quote