Jump to content
Sign in to follow this  
leet

Animations and userconfig.

Recommended Posts

Hi i have animation and want it to be played anytime by pushing the button selected in userconfig hpp file. What do i need to add in the models config file and attach it to the button.

Share this post


Link to post
Share on other sites

"button" ?

"userconfig"?

Sounds like a ACE question only, for the ACE thread, not here.

Share this post


Link to post
Share on other sites

Ok i can say it different way. I have action which must be played in game after pushing button. So far as i know it is possible to do without "userconfig".

Share this post


Link to post
Share on other sites

? Is this a Mission editing & scripting question?

Because you have posted in the Addon editing forum.

Suggest you post in the MISSION EDITING & SCRIPTING sub forum to get an answer.

For Addons, adding a feature where pressing a key does something is very difficult if near impossible.

Share this post


Link to post
Share on other sites

may be something like this??

	class Mi17_rockets_RU: Mi17_base_RU
{
	class UserActions
	{
		class HUDoff
		{
			displayName = "HUD on";
			displayNameDefault = "HUD on";
			position = "zamerny";
			radius = 1;
			onlyForPlayer = 1;
			condition = "(player==driver this)and(this animationphase ""HUDAction"" !=0)";
			statement = "this animate [""HUDAction"",0];this animate [""HUDaction_Hide"",0]";
		};
		class HUDon
		{
			displayName = "HUD off";
			displayNameDefault = "HUD off";
			position = "zamerny";
			radius = 1;
			onlyForPlayer = 1;
			condition = "(player==driver this)and(this animationphase ""HUDAction"" !=1)";
			statement = "this animate [""HUDAction"",1];this animate [""HUDaction_Hide"",1]";
		};
	};
};

Share this post


Link to post
Share on other sites

You might be interested in the functions CBA provides for this:

To define the key directly in script: http://dev-heaven.net/docs/cba/files/events/fnc_addKeyHandler-sqf.html

Or to read the key from a userconfig: http://dev-heaven.net/docs/cba/files/events/fnc_addKeyHandlerFromConfig-sqf.html

For the latter, you'll have to create a my_settings.pbo, only pack (not binarize) it, and make an include like:

http://dev-heaven.net/projects/ace-mod2/repository/revisions/develop/entry/Addons/settings/CfgSettings.hpp#L7

The important part is the CfgSettings>>CBA>>Events section.

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  

×