Jump to content
Sign in to follow this  
enad

How to make an Animation loop?

Recommended Posts

It's only there so it's not the same name as the pilot, that's a pointer to the script that's being used by the pilots. The use of "this" in the call command passes the name of the pilot. It could look like this as well.

pilot1act = [Pilot1,"ActsPsitMstpSnonWunaDnon_sceneNikitinDisloyalty_Sykes",true,true] execVM "animLoop.sqf";

You would also need to use it this way if your calling the action from a trigger, as "this" won't work in a trigger.

Share this post


Link to post
Share on other sites
It's only there so it's not the same name as the pilot, that's a pointer to the script that's being used by the pilots. The use of "this" in the call command passes the name of the pilot. It could look like this as well.

pilot1act = [Pilot1,"ActsPsitMstpSnonWunaDnon_sceneNikitinDisloyalty_Sykes",true,true] execVM "animLoop.sqf";

You would also need to use it this way if your calling the action from a trigger, as "this" won't work in a trigger.

Alright, we're all set then.

Share this post


Link to post
Share on other sites
animLoop.sqf

_unit = _this select 0;
_anim = _this select 1;

while{alive _unit}do{
_unit playMove _anim;
waitUntil{animationState _unit != _anim};
};

Call with:

0 = [this,"ActsPercMstpSnonWnonDnon_talking02"] execVM "animLoop.sqf";

how do you add an action that makes it so if a player is within 2 meters and they have a first aid kit (i'm using a different animation) it will stop the loop?

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  

×