BIS fnc keyHold: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (infobox to template)
m (page filled)
Line 1: Line 1:
{{Function|= Comments
{{Function


| arma3 |Game name=
|game1= arma3


|1.00|Game version=
|version1= 1.00


<!---|arg= local |Multiplayer Arguments=--->
<!--|exec= server|=-->


<!---|eff= local |Multiplayer Effects=--->
<!--|arg= local-->


| <pre>/*
|eff= local
Author: Thomas Ryan


Description:
|descr= Allows for hold button interactions. Hold action is started by pressing the space bar.
Allow for hold button interactions.


Parameters:
|s1= [description, duration, condition, arguments, loaded] [[spawn]] [[BIS_fnc_keyHold]]
_this select 0 (Optional): STRING - Description of the performed action, displayed inside the progress bar.
_this select 1 (Optional): NUMBER - Duration of the action. (Default: 2 seconds)
_this select 2 (Optional): STRING or CODE - Condition that must be met for the action to display.
_this select 3 (Optional): ARRAY - Arguments passed to the code executed.


Returns:
|p1= description: [[String]] - Description of the performed action, displayed inside the progress bar.
True if the action was successful, false if it was interrupted.
*/</pre>{{placeholder}}<!-- Remove this after fill-in --> |Description=


|[] call [[BIS_fnc_keyHold]]|Syntax=
|p2= duration: [[Number]] - (Optional, default 2) Duration of the action


|p1= parameter: Datatype - (Optional, default defValue) description |Parameter 1=
|p3= condition: [[Code]] or [[String]] - (Optional, default {[[true]]}) Condition that must be met for the action to display


|Datatype - description|Return value=
|p4= arguments: [[Array]] - (Optional, default []) Arguments passed to the condition


|x1= <code></code>|Example 1=
|p5= loaded: [[Boolean]] - (Optional, default [[false]]) Defines if function is already loaded. This is handled by the function
 
|r1= [[Nothing]]
 
|x1= <code>["Hold that key!",2,{[[alive]] [[player]]}] [[spawn]] [[BIS_fnc_keyHold]];</code>
 
|exec= spawn
 
|seealso= [[BIS_fnc_holdActionAdd]]


| |See also=
}}
}}



Revision as of 11:34, 12 January 2020

Hover & click on the images for description

Description

Description:
Allows for hold button interactions. Hold action is started by pressing the space bar.
Execution:
spawn
Groups:
Uncategorised

Syntax

Syntax:
[description, duration, condition, arguments, loaded] spawn BIS_fnc_keyHold
Parameters:
description: String - Description of the performed action, displayed inside the progress bar.
duration: Number - (Optional, default 2) Duration of the action
condition: Code or String - (Optional, default {true}) Condition that must be met for the action to display
arguments: Array - (Optional, default []) Arguments passed to the condition
loaded: Boolean - (Optional, default false) Defines if function is already loaded. This is handled by the function
Return Value:
Nothing

Examples

Example 1:
["Hold that key!",2,{alive player}] spawn BIS_fnc_keyHold;

Additional Information

See also:
BIS_fnc_holdActionAdd

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