BIS_fnc_holdActionAdd

From Bohemia Interactive Community
Revision as of 13:05, 16 July 2016 by R3vo (talk | contribs) (Added page for BIS_fnc_holdActionAdd (Please review))
Jump to navigation Jump to search
Hover & click on the images for description

Description

Description:
Adds an action to an object which requires the user to hold a key to perform the action.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[target,title,idleIcon,progressIcon,condShow,condProgress,codeStart,codeProgress,codeCompleted,codeInterupted,arguments,duration,priority,removeCompleted,showUncon] call BIS_fnc_holdActionAdd;
Parameters:
target: Object - Object the action is attached to
title: String - Title of the action shown in the action menu
idleIcon: String - Idle icon shown on screen
progressIcon: String - Progress icon shown on screen
condShow: 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)
condProgress: String - Condition for the action to progress.If false is returned action progress is halted; arguments passed into it are: _target, _caller, _id, _arguments
codeStart: Code - Code executed when action starts.
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
3: Number - ID (_this select 2) - ID of the activated action (same as ID returned by addAction)
4: Array - arguments (_this select 3) - arguments given to the script if you are using the extended syntax
codeProgress: Code - Code executed on every progress tick; arguments [target, caller, ID, arguments, currentProgress]; max progress is always 24
codeCompleted: Code - Code executed on completion; arguments [target, caller, ID, arguments]
codeInterupted: Code - Code executed on interrupted; arguments [target, caller, ID, arguments]
arguments: Array - Arguments passed to the scripts
duration: Number - Action duration; how much time it takes to complete the action
priority: Number - Priority; actions are arranged in descending order according to this value
removeCompleted: BOOL - Remove on completion (default: true)
showUncon: BOOL -Show in unconscious state (default: false)
Return Value:
Number - Action ID

Examples

Example 1:
[ player,"Kill","","","true","true",{hint "Started!"},{systemChat str (_this select 4)},{player setDamage 1},{hint "Afraid of death?"},[],10,nil,true,false] call BIS_fnc_holdActionAdd;

Additional Information

See also:
BIS_fnc_holdActionRemove

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

Notes

Bottom Section