Description
/*
Original Author: Jiri Wainar
Edit Author: Ethan Johnson
Description:
Add a hold action. If the hold actions are not initialized yet, initialize the system first.
Parameters:
0: OBJECT - object action is attached to
1: STRING - action title text shown in action menu
2: STRING or CODE - idle icon shown on screen; if CODE is used the code needs to return the path to icon
3: STRING or CODE - progress icon shown on screen; if CODE is used the code needs to return the path to icon
4: STRING - condition for the action to be shown; special variables passed to the script code are _target (unit to which action is attached to) and _this (caller/executing unit)
5: STRING - condition for action to progress; if false is returned action progress is halted; arguments passed into it are: _target, _caller, _id, _arguments
6: CODE - code executed on start; arguments passed into it are [target, caller, ID, arguments]
0: OBJECT - target (_this select 0) - the object which the action is assigned to
1: OBJECT - caller (_this select 1) - the unit that activated the action
2: NUMBER - ID (_this select 2) - ID of the activated action (same as ID returned by addAction)
3: ARRAY - arguments (_this select 3) - arguments given to the script if you are using the extended syntax
7: CODE - code executed on every progress tick; arguments [target, caller, ID, arguments, currentProgress]; max progress is always 24
8: CODE - code executed on completion; arguments [target, caller, ID, arguments]
9: CODE - code executed on interrupted; arguments [target, caller, ID, arguments]
10: ARRAY - arguments passed to the scripts
11: NUMBER - action duration; how much time it takes to complete the action
12: NUMBER - priority; actions are arranged in descending order according to this value
13: BOOL - remove on completion (default: true)
14: BOOL - show in unconscious state (default: false)
15: BOOL - show on screen; if false action needs to be selected from action menu to appear on screen (default: true)
Example:
[_target,_title,_iconIdle,_iconProgress,_condShow,_condProgress,_codeStart,_codeProgress,_codeCompleted,_codeInterrupted,_arguments,_duration,_priority,_removeCompleted,_showUnconscious] call bis_fnc_holdActionAdd;
Returns:
Action ID, can be used for removal or referencing from other functions.
*/
params
[
["_target",objNull,[objNull]],
["_title","MISSING TITLE",[""]],
["_iconIdle","\A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_revive_ca.paa",["",{}]],
["_iconProgress","\A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_revive_ca.paa",["",{}]],
["_condShow","true",[""]],
["_condProgress","true",[""]],
["_codeStart",{},[{}]],
["_codeProgress",{},[{}]],
["_codeCompleted",{},[{}]],
["_codeInterrupted",{},[{}]],
["_arguments",[],[[]]],
["_duration",10,[123]],
["_priority",1000,[123]],
["_removeCompleted",true,[true]],
["_showUnconscious",false,[true]],
["_showWindow",true,[true]]
(Placeholder description extracted from the function header by LM_exportFunctionsToWiki.sqf)
Syntax
- Syntax
- [] call VN_fnc_holdActionAdd;
- Return value
- Nothing
Examples
- Example 1
-