Jump to content
nebulazerz

Is it possible to add animations to the mission file?

Recommended Posts

I will explain a little bit about what I am trying to do in parts. First part, I know you can increase the movement speed of units by using a new animation via modding but I am trying to avoid having players to manually download anything before connecting to the server so adding any kind of mod is out.   Didn't need animations, the game has great built in script command for it.

 

What I want to do with this new animation is use it with the new holdAction to have the animation activated while the hold action is in use and then once the player lets go of their action button it will put the animation on a cooldown(sleep 120;).

 

Is anything like this possible with the hold action or would it have to wait until the hold action is finished to use it? Does anyone have any documentation on the holdAction?

 

EDIT: Here it is, the ability to sprint for a bit of extra time by using the hold action :D. I will update it as I mess with it more, Im going to dig through the icons. these icons are still the ones from kylanias demo for it.

[
/* 0 object */				player,
/* 1 action title */			"Sprint 1",
/* 2 idle icon */			"\a3\ui_f_exp_a\Data\RscTitles\RscEGProgress\downloadicon_ca.paa",
/* 3 progress icon */			"\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\upload_ca.paa",
/* 4 condition to show */		"true",
/* 5 condition for action */		"true",
/* 6 code executed on start */		{player setAnimSpeedCoef 1.50},
/* 7 code executed per tick */		{player setAnimSpeedCoef 2},
/* 8 code executed on completion */	{player setAnimSpeedCoef 1},
/* 9 code executed on interruption */	{player setAnimSpeedCoef 1},
/* 10 arguments */			["Sprint"],
/* 11 action duration */		3,
/* 12 priority */			0,
/* 13 remove on completion */		false,
/* 14 show unconscious */		false
] call bis_fnc_holdActionAdd;

Share this post


Link to post
Share on other sites

Bis Forum Post : https://forums.bistudio.com/topic/192346-woah-woah-woah-bi-trying-to-sneak-one-in/?p=3058266

You can also look up the function via function viewer in-game.

I Don't know about your custom animation but you can certainly find a fitting animation (probably hammering on a keyboard animation) in the anim-viewer.

To disable interaction you can set a variable to false on interruption and spawn a sleep to set it true again after a certain amount of time. Look at the parameters of the function.

  • Like 1

Share this post


Link to post
Share on other sites

Bis Forum Post : https://forums.bistudio.com/topic/192346-woah-woah-woah-bi-trying-to-sneak-one-in/?p=3058266

You can also look up the function via function viewer in-game.

I Don't know about your custom animation but you can certainly find a fitting animation (probably hammering on a keyboard animation) in the anim-viewer.

To disable interaction you can set a variable to false on interruption and spawn a sleep to set it true again after a certain amount of time. Look at the parameters of the function.

Thanks for the link. My understanding with animation though is that it effects the players movement speed, I could be wrong though. If not then, is there a BIS function that allows you to change the speed that your unit is moving past the top speed of running now? I see exactly how i could do it with this hold action, they gave us great control of its parameters and they set it up in a very easy way.

Share this post


Link to post
Share on other sites

You have to differentiate between the animations a unit does by it self, which I don't think can be altered easily and the animations you can make a unit do by using playMoveNow/switchMove/playMove or something similar. These can be affected by the script command I have send you.

  • Like 1

Share this post


Link to post
Share on other sites

You have to differentiate between the animations a unit does by it self, which I don't think can be altered easily and the animations you can make a unit do by using playMoveNow/switchMove/playMove or something similar. These can be affected by the script command I have send you.

Thanks for the tips. I have made an eventHandler that checks what uniform you are wearing and depending on which one you are wearing it will give you different powers, I only have the blu suit working with blink right now, but I plan to add the sprint ability to a VR suit this same way and the setAnimSpeedCoef. It looks like the animspeedcoef is a percentage. will it work to set it to 2 for 200%? Ill try it out and see what happens. 

 

EDIT: HAHAHA Woww it works and its the funniest thing I have seen in arma. I suggest trying player setAnimSpeedCoef 5; in the debug console you will get a good laugh.

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

×