Jump to content

Recommended Posts

Hello, community. Here is what I want to achieve:

-     I want to combine 3 different animations into one;

-     the player should be able to play these 3 animations sequentially;

QUESTION 1: Should these animations be united as one and used all together in one script or

QUESTION 2: Perhaps they could be used individually with a “wait until” command between them, so the script “should wait” until the first one is completed in order to perform the second one and when it is over, the third one will be played as well.

ANIMATIONS:

1.      The player waking up being wounded and then stands up after X seconds.

2.      The player then looks around like in another script we already well know where he can set up a camp, sleep and then wake up in X hours.

3.      The player then moves along an invisible way with his weapon in his right hand like in a cinematic intro.

I have reworked this last animation’s content making it stop functioning when: player distance obj1 <X. This means I need to stop all these animations, when they are completed, with this part above, used in a trigger’s “On Activation” field.

 

Animations:

 

Nr. 1 -    should be put in player’s init field:

[this, "PRONE_INJURED"] call BIS_fnc_ambientAnim; 0 = this spawn {waitUntil {time > 10}; _this call BIS_fnc_ambientAnim__terminate; _this switchMove "AinjPpneMstpSnonWnonDnon_rolltofront";_this playMove "AmovPknlMstpSnonWnonDnon"};

 

Nr. 2    -     should be activated by:

player addAction ["<t color=""#F8FF24"">" +format["Set Up Camp"],"Camp_Script\spawn.sqf"];

 

Here you can find the files for this script:

http://www.armaholic.com/page.php?id=28555

 

Nr. 3    -     in a trigger or in playerinit.sqf:

player disableAI "move";_nul = [] spawn {player switchMove "Acts_PercMwlkSlowWrflDf2";player disableAI "ANIM";waitUntil{(player distance target1) < 8};player switchMove "";}; [1, 60,true,true] call BIS_fnc_cinemaBorder;

 

-     target1 one is the object that the player needs to reach and when he does, the animation stops working.

 

So, friends, how can we combine these 3 animations into one? Thank you in advance!

 

Happy scripting and cheers!

Share this post


Link to post
Share on other sites

To be honest I got a bit confused. In general however for animations you can use in a script for example:


 

NameOfPlayer switchMove "NameOfAnimation_1";
sleep 2.316;
NameOfPlayer switchMove "NameOfAnimation_2";

 

A reason why the exact time of the animation is shown in the animation viewer. Also the above will work for SP missions. For MP ones the initPlayerLocal.sqf will be needed 👍

  • Like 3

Share this post


Link to post
Share on other sites
20 hours ago, JohnKalo said:

To be honest I got a bit confused. In general however for animations you can use in a script for example:


 


NameOfPlayer switchMove "NameOfAnimation_1";
sleep 2.316;
NameOfPlayer switchMove "NameOfAnimation_2";

 

A reason why the exact time of the animation is shown in the animation viewer. Also the above will work for SP missions. For MP ones the initPlayerLocal.sqf will be needed 👍

:yeahthat:

You can see this in action in this intro to one of my mission..pay attention to the catapult officer on the right....

 

  • Like 2

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

×