Jump to content
Sign in to follow this  
IndeedPete

Animation Loop

Recommended Posts

Hi folks, i need your help! I'm trying to create a small animation loop script to get a bit more life into my camp. But my problem is that the animations aren't repeated as they should. Here's the script:

_unit = _this select 0;
_animation = _this select 1;
_noWeapons = _this select 2;

_unit disableAI "anim";
_unit setVariable ["BIS_noCoreConversations", true];
if (_noWeapons) then {removeAllWeapons _unit};

sleep 3;

while {true} do {
_unit switchMove _animation;
waitUntil {!(animationState _unit == _animation)};
};

The script is called via:

nil = [this,"sykes1_c0start",true] execVM "scripts\animationLoop.sqf";

Any help is appreciated! :)

---------- Post added at 10:37 PM ---------- Previous post was at 10:14 PM ----------

Nevermind, i found my mistake. Here's the working version:

_unit = _this select 0;
_animation = _this select 1;
_noWeapons = _this select 2;

_unit setVariable ["BIS_noCoreConversations", true];
if (_noWeapons) then {removeAllWeapons _unit};

while {true} do {
_unit switchMove _animation;
waitUntil {!(animationState _unit == _animation)};
};

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×