actionParams: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{Command|= Comments ____________________________________________________________________________________________ | arma3dev |= Game name |1.63|= Game version _______________...")
 
m (Some wiki formatting)
 
(51 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma3dev |= Game name
|game1= arma3
|1.63|= Game version
|version1= 1.64
____________________________________________________________________________________________


| Returns [[Array]] with params for given action id (similar to [[addAction]] param array). The output array is of the following format:
|gr1= Interaction
<tt>[title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, radius, unconscious, textWindowBackground, textWindowForeground]</tt>,  where:
 
|descr= Returns [[Array]] with params for given user action id (similar to [[addAction]] param array).
 
|s1= entity [[actionParams]] id
 
|p1= entity: [[Object]] - entity with added user actions
 
|p2= id: [[Number]] - id of existing user action (returned by [[addAction]] or [[actionIDs]])
 
|r1= [[Array]] in format [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, radius, unconscious, textWindowBackground, textWindowForeground, selection, memoryPoint]:
{{Columns|2|
* title: [[String]] - action title text
* title: [[String]] - action title text
* script: [[String]] - script file or script expression assigned to the action
* script: [[String]] - script file or script expression assigned to the action
Line 19: Line 27:
* unconscious: [[Boolean]] - whether the action is available to [[setUnconscious|unconscious]] person
* unconscious: [[Boolean]] - whether the action is available to [[setUnconscious|unconscious]] person
* textWindowBackground: [[String]] - same as textWindowBackground in [[setUserActionText]]
* textWindowBackground: [[String]] - same as textWindowBackground in [[setUserActionText]]
* textWindowForeground: [[String]] - same as textWindowForeground in [[setUserActionText]]|= Description
* textWindowForeground: [[String]] - same as textWindowForeground in [[setUserActionText]]
____________________________________________________________________________________________
* selection: [[String]] - named selection in Geometry LOD to which the action is attached
 
* memoryPoint: [[String]] - memory point on the object to which the action is attached
| entity [[actionParams]] id |= Syntax
}}
If ''entity'' is [[objNull]], the following array is returned:
<sqf>["", "", nil, 1.5, true, true, "", "", 50, false, "", "", "", ""]</sqf>


|p1= entity: [[Object]] - entity with added user actions |= Parameter 1
(returned [[Nothing]] until {{arma3}} v1.94)
|p2= id: [[Number]] - id of existing user action (returned by [[addAction]] or [[actionIDs]]) |= Parameter 2


| [[Array]] - Array of action params |= Return Value
|x1= <sqf>_params = player actionParams 0;</sqf>
____________________________________________________________________________________________
|x1= <code>_params = [[player]] [[actionParams]] 0;</code> |= Example 1
____________________________________________________________________________________________
| [[addAction]], [[setUserActionText]], [[inGameUISetEventHandler]], [[showHUD]], [[inputAction]], [[removeAction]], [[removeAllActions]], [[action]] |= See Also


| |= MPBEHAVIOUR
|seealso= [[actionIDs]] [[addAction]] [[setUserActionText]] [[inGameUISetEventHandler]] [[showHUD]] [[inputAction]] [[removeAction]] [[removeAllActions]] [[action]]
____________________________________________________________________________________________
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 12:00, 14 May 2022

Hover & click on the images for description

Description

Description:
Returns Array with params for given user action id (similar to addAction param array).
Groups:
Interaction

Syntax

Syntax:
entity actionParams id
Parameters:
entity: Object - entity with added user actions
id: Number - id of existing user action (returned by addAction or actionIDs)
Return Value:
Array in format [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, radius, unconscious, textWindowBackground, textWindowForeground, selection, memoryPoint]:
  • title: String - action title text
  • script: String - script file or script expression assigned to the action
  • arguments: Anything or nil - arguments passed to the action
  • priority: Number - action priority on the action menu
  • showWindow: Boolean - whether the action is shown in the center of the screen too
  • hideOnUse: Boolean - whether the action menu should close after selecting the action
  • shortcut: String - action bindings to some existing engine action if any
  • condition: String - expression returning true or nil for action to appear on the action menu
  • radius: Number - max distance to entity at which action becomes available. -1 means it is engine default (~15m)
  • unconscious: Boolean - whether the action is available to unconscious person
  • textWindowBackground: String - same as textWindowBackground in setUserActionText
  • textWindowForeground: String - same as textWindowForeground in setUserActionText
  • selection: String - named selection in Geometry LOD to which the action is attached
  • memoryPoint: String - memory point on the object to which the action is attached

If entity is objNull, the following array is returned:

["", "", nil, 1.5, true, true, "", "", 50, false, "", "", "", ""]

(returned Nothing until Arma 3 v1.94)

Examples

Example 1:
_params = player actionParams 0;

Additional Information

See also:
actionIDs addAction setUserActionText inGameUISetEventHandler showHUD inputAction removeAction removeAllActions action

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note