Jump to content

Recommended Posts

Hello! Please could someone explain in general how to animate an unit? I mean I understand functions, timings etc, but how to implement movement of the unit?

For example, unit idiling for some time then some condition occur and start walking from point A to point B, and on point B unit starting to repair? How to implement walking to specific point B with precision?

Share this post


Link to post
Share on other sites

Well you can set a variable. Set it to true and when the variable is set to true run a script. In the script you can use:

name_of_unit playMove "name_of_first_animation";

sleep number_of_seconds_the_animation_lasts;

name_of_unit switchMove "";

name_of_unit playMove "name_of_second_animation";

sleep number_of_seconds_the_animation_lasts;

name_of_unit switchMove "";

Now you do not need a variable for sure. Any condition can do the trick. Also you have to keep in mind that the above works in SP missions. For MP missions you can place the same code in the initPlayerLocal.sqf. There you can place:

if {name_of_variable isEqualTo true} then



{



name_of_unit playMove "name_of_first_animation";

sleep number_of_seconds_the_animation_lasts;

name_of_unit switchMove "";

name_of_unit playMove "name_of_second_animation";

sleep number_of_seconds_the_animation_lasts;

name_of_unit switchMove "";



}

The name of the animations can be found in the animation viewer. And you have to test the animations again and again. You cannot know, as far as I am aware, the exact position of the animation placement. So if you want a repair animation to work you will have to move the vehicle to be repaired around. Oh and keep in mind that none but a few of the animations change smoothly from the one to the other. There might be a small teleport when animations change.

  • Like 1

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

×