Jump to content
Sign in to follow this  
Moonwayfarer

addActon shortcut HAAAALP

Recommended Posts

So I want to add action with shortcut. BIkipedia says that it's possible, cause

unit addAction [title, script, arguments, priority, showWindow, hideOnUse, [b]shortcut[/b], condition, positionInModel, radius, radiusView, showIn3D, available, textDefault, textToolTip]

where

shortcut (optional): String - One of the key names (i think, http://community.bistudio.com/wiki/ArmA_2:_CfgDefaultKeysMapping these key names) defined in bin.pbo (e.g. "moveForward"). Adding available shortcut will bind corresponding keyboard key to this action. Shortcut availability can be tested with inputAction command. Default value: ""

So I tried to do that

this addAction [
"Jump",
{player switchMove "AovrPercMrunSrasWrflDf"}, 
"",
1,
true,
true,
User1]

And I just don't know what went wrong.

Is "User1" - "Use Action 1" in "Custom Controls" tab?

Can someone help me?

Please?

------------------------------------------------

Ok, now another problem. I want to disable this action while jumping. I mean, now everytime you press "Custom Action 1" button, animation is playing (and if you'll press it fast enough, soldier will run on 1 leg). Condition isTouchingGround player isn't working.

OH and while I'm here.

Guyz. There're a lot of healing animations. Why everytime I use some healing user scripts I see a soldier doing injection? Srsly. D:

Edited by Moonwayfarer

Share this post


Link to post
Share on other sites

Open your .Arma3profile in Documents -> Arma 3 and looka t the user actions available for you. Arma2s keymapping is most likely missing a few things in comparison to A3. What error is it throwing you by the way?

Share this post


Link to post
Share on other sites

Have you tried it like this

this addAction ["Jump",{player switchMove "AovrPercMrunSrasWrflDf"},"",1,true,true,"User1"];

Share this post


Link to post
Share on other sites

Oh, it werks, thanks!

---------- Post added at 22:46 ---------- Previous post was at 22:26 ----------

But wait, there's more!

How do I disable action while I'm jumping?

I know there's a jumping script on armaholic, but I believe I can make this thing a bit easier.

Share this post


Link to post
Share on other sites

in the sqf you have created, type this right underneath your scripts:

_unit removeAction _action;

And thats how you remove the action :)

Share this post


Link to post
Share on other sites
_unit = _this select 0;
_ID = _this select 2;

_unit removeaction _ID;

Share this post


Link to post
Share on other sites

Do you need a:

sleep 5;

above the addaction script?

Edited by Ranwer

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  

×