addAction – Talk

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>" to "<code style="display: block">")
 
(8 intermediate revisions by 3 users not shown)
Line 35: Line 35:
[[User:Sy|Sy]] 19:49, 3 April 2007 (NZST)
[[User:Sy|Sy]] 19:49, 3 April 2007 (NZST)


<code>Supply action on g7 - missing action</code>This is [[arma.RPT]] error when you call for Support in MP. Perhaps if we addaction a support then this radio call can work? --[[User:Doolittle|Doolittle]] 04:55, 17 September 2007 (CEST)
<code style="display: block">Supply action on g7 - missing action</code>This is [[arma.RPT]] error when you call for Support in MP. Perhaps if we addaction a support then this radio call can work? --[[User:Doolittle|Doolittle]] 04:55, 17 September 2007 (CEST)


:Instead of asking questions all the time that you can quite easily test yourself, why don't you do just that. --[[User:Sy|Sy]] 16:47, 17 September 2007 (CEST)
:Instead of asking questions all the time that you can quite easily test yourself, why don't you do just that. --[[User:Sy|Sy]] 16:47, 17 September 2007 (CEST)
Line 41: Line 41:


Here's some action priorities found in ui.pbo:
Here's some action priorities found in ui.pbo:
<code>Gear 1;
<code style="display: block">Gear 1;
GetOut 3.9;
GetOut 3.9;
Eject 0.9;
Eject 0.9;
Line 56: Line 56:
== getActions ==
== getActions ==


Is there any possibility to get the amount of Actions? Because many scriptkiddies use this menu to execute commands....
Is there any possibility to get the amount of Actions? Because many scriptkiddies use this menu to execute commands....<br>
- Will
I mean the number of usermade addActions... some scripthacks use this menu to kill or destroy things and i cant do anything against...<br>
I tried a script with adding and remove an action so i get the highest addAction number, but engine addctions count also...<br>
Something like getActions returns the number or the number and the title... but only for usermade actions...<br>
--[[User:Will|Will]] ([[User talk:Will|talk]]) 23:23, 15 July 2015 (CEST)
 
== addAction id's ==
 
BIKI says: ID (_this select 2): Number - ID of the activated action (same as ID returned by addAction). Just a little difference in fact:<br>
(_this select 2) will return something if the inside code is activated, I mean the action is triggered.<br>
player addAction ["your action menu", {action_id = _this select 2; ...code}]; will return a nil action_id until you're using this action.<br>
On the other hand, a handle will work as soon as the action exists (not yet used). If you need to check if an action menu still exists, use the handle:<br>
your_handle = player addAction ["your action menu", {code}];<br>
then you can remove it for example before using it.<br>
--[[User:Pierre MGI|Pierre MGI]] 10:24, 19 April 2016 (HAWAII Time)

Latest revision as of 11:53, 11 January 2023

Is the 'spawn' command compatible with addaction? If so, what is the correct syntax?


Might it be that the arguments parameter is of type Code or possibly Structured Text....anyone??

Planck 19:27, 5 March 2007 (CET)


You can pass 1 variable in the 'arguments' parameter position.

This 1 variable may be of any 'Type' - I haven't tested all the different types, but I did test a variable of type Array, Code, String and all were parsed to the designated script with the type intact. Sy 11:04, 6 March 2007 (NZT)

Just an idea: Wouldn't it make sense to leave away the brackets in the second syntax? The short version is covered in the first syntax description anyway. --hardrock 20:24, 19 March 2007 (CET)


It's just me putting back the original syntax statement as it is in the original BI ArmA comref.

You are probably correct, but I was thinking more of the newcomers to the command reference and how to differentiate, in short, trying to make it easier for them to grasp the concept as addAction is not exactly simple in terms of the presented explanation. It is easy for us veterans, who know the commands, especially the old ones, but, for newcomers it might not seem so easy. So, I was trying to mark the difference. If you feel it can be clearer without the brackets .......go ahead.

Planck 21:07, 19 March 2007 (CET)


I think that the brackets might actually be more confusing for newcomers, since they would actually type the brackets in their code (copy-paste-style). I will remove them if it's fine for you. --hardrock 15:09, 20 March 2007 (CET)


The arguments parameter is not limited to strings. Following up on Sy:s tests, I have so far been able to pass arguments of the following types: array, boolean, group, number, object, side, string, code, script (handle) and "nothing". Hypothesis: perhaps Anything is the proper type for arguments? (Some types remain to be tested before this can be concluded - Config, Control, Display and Structured Text)

Killswitch 15:53, 2 April 2007 (CEST)


Oh, yes all true Killswitch... forgot to come back and alter to 'anything'... lol.

Sy 19:49, 3 April 2007 (NZST)

Supply action on g7 - missing actionThis is arma.RPT error when you call for Support in MP. Perhaps if we addaction a support then this radio call can work? --Doolittle 04:55, 17 September 2007 (CEST)

Instead of asking questions all the time that you can quite easily test yourself, why don't you do just that. --Sy 16:47, 17 September 2007 (CEST)
10-4. --Doolittle 18:50, 17 September 2007 (CEST)

Here's some action priorities found in ui.pbo: Gear 1; GetOut 3.9; Eject 0.9; LadderOnUp 1; LadderOff 5; MoveToDriver 4.05; MoveToGunner 4.35; LoadEmptyMagazine 9.1; GetInDriver 4.8; Repair 7.6; Heal 9.9; AutoHover 6;--Doolittle 07:48, 22 September 2007 (CEST)

getActions

Is there any possibility to get the amount of Actions? Because many scriptkiddies use this menu to execute commands....
I mean the number of usermade addActions... some scripthacks use this menu to kill or destroy things and i cant do anything against...
I tried a script with adding and remove an action so i get the highest addAction number, but engine addctions count also...
Something like getActions returns the number or the number and the title... but only for usermade actions...
--Will (talk) 23:23, 15 July 2015 (CEST)

addAction id's

BIKI says: ID (_this select 2): Number - ID of the activated action (same as ID returned by addAction). Just a little difference in fact:
(_this select 2) will return something if the inside code is activated, I mean the action is triggered.
player addAction ["your action menu", {action_id = _this select 2; ...code}]; will return a nil action_id until you're using this action.
On the other hand, a handle will work as soon as the action exists (not yet used). If you need to check if an action menu still exists, use the handle:
your_handle = player addAction ["your action menu", {code}];
then you can remove it for example before using it.
--Pierre MGI 10:24, 19 April 2016 (HAWAII Time)