leet 24 Posted May 21, 2010 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
[aps]gnat 28 Posted May 25, 2010 "button" ? "userconfig"? Sounds like a ACE question only, for the ACE thread, not here. Share this post Link to post Share on other sites
leet 24 Posted June 10, 2010 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
[aps]gnat 28 Posted June 11, 2010 ? 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
nikita320106 0 Posted June 11, 2010 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
sickboy 13 Posted June 11, 2010 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