Jump to content
Sign in to follow this  
R34P3R

How to play Revive/Medic animations nice on each client ?

Recommended Posts

Hey Guys. i need some help with my revive Script.

i need to play some animations on Revive but my Script not working :-( hope somebody can help me with it.

Thanks a lot !

r3_reviveAnim =
{
private ["_unit"];

_unit = _this select 0;

_unit playMoveNow "AinvPknlMstpSnonWnonDnon_medic0";
waitUntil{alive _unit && _unit getVariable "r3_unitIsDown" == 0 && animationState _unit != "AinvPknlMstpSnonWnonDnon_medic0"};

if(alive _unit && _unit getVariable "r3_unitIsDown" == 0) then {
	_unit playMoveNow "AinvPknlMstpSnonWnonDnon_medic1";
	waitUntil{alive _unit && _unit getVariable "r3_unitIsDown" == 0 && animationState _unit != "AinvPknlMstpSnonWnonDnon_medic1"};
};

if(alive _unit && _unit getVariable "r3_unitIsDown" == 0) then {
	_unit playMoveNow "AinvPknlMstpSnonWnonDnon_medic3";
	waitUntil{alive _unit && _unit getVariable "r3_unitIsDown" == 0 && animationState _unit != "AinvPknlMstpSnonWnonDnon_medic3"};
};
};

Share this post


Link to post
Share on other sites

You may need to create "function commands" then execute them with BIS_fnc_MP:

//psuedo

fnc_animate =
{
  (_this select 0) animate (_this select 1);
};

//example call

[[_unit,_animation],"fnc_animate",true,false,false] call BIS_fnc_MP;

Share this post


Link to post
Share on other sites

but how can i script the animation itself ? the Model always play only the first Animation right or he switching to the primary weapon before playing the next one.

Share this post


Link to post
Share on other sites
but how can i script the animation itself ? the Model always play only the first Animation right or he switching to the primary weapon before playing the next one.

you might need to temporarily remove the primary weapon and sidearm then store them with a variable then add them back after the animations are done.

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  

×