BIS fnc holdKey: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page for BIS_fnc_holdKey)
 
m (game version changed from arma3 dev to arma3, v1.79 to 1.78 (patch version), see https://dev.arma3.com/post/spotrep-00076)
Line 3: Line 3:
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma3 dev|= Game name
| arma3|= Game name


|1.79|= Game version
|1.78|= Game version
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 22: Line 22:
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>[ [[findDisplay]] 46,36,5,{[[hint]] "Key 'J' pressed for 5 seconds"}] [[call]] '''BIS_fnc_holdKey''';//Action is added to the mission display</code> |= Example 1
|x1= <code><nowiki>[</nowiki>[[findDisplay]] 46,36,5, {[[hint]] "Key 'J' pressed for 5 seconds"}] [[call]] [[BIS_fnc_holdKey]]; // Action is added to the mission display</code> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________


|[[BIS_fnc_holdActionAdd]], [[addAction]]|= See also
| [[BIS_fnc_holdActionAdd]], [[addAction]] |= See also


}}
}}

Revision as of 00:15, 12 February 2018


Hover & click on the images for description

Description

Description:
Function that executes a user-defined code when a key has been held down for a long enough time.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[display, key, time, code, control] call BIS_fnc_holdKey
Parameters:
Display - display - Display the event is attached to (map display is default).
Number - key - What key to press.
Number - time - how long the key has to be held down in seconds.
Code - code - Code to be executed when key is held down for long enough.
Control - control - Optional - text control to be used in place of the default "Press X to skip" control.
Return Value:
None

Examples

Example 1:
[findDisplay 46,36,5, {hint "Key 'J' pressed for 5 seconds"}] call BIS_fnc_holdKey; // Action is added to the mission display

Additional Information

See also:
BIS_fnc_holdActionAddaddAction

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