BIS fnc holdKey: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...)
Line 1: Line 1:
{{Function|Comments=
{{Function


| arma3|Game name=
| arma3


|1.78|Game version=
|1.78


|gr1 = Interaction |GROUP1=
|gr1 = Interaction


|Function that executes a user-defined code when a key has been held down for a long enough time. |DESCRIPTION=
|Function that executes a user-defined code when a key has been held down for a long enough time.


|[display, key, time, code, control] call '''BIS_fnc_holdKey'''|SYNTAX=
|[display, key, time, code, control] call '''BIS_fnc_holdKey'''


|p1= [[Display]] - display  - Display the event is attached to (map display is default).|PARAMETER1=
|p1= [[Display]] - display  - Display the event is attached to (map display is default).
|p2= [[Number]] - key  - What key to press.|PARAMETER2=
|p2= [[Number]] - key  - What key to press.
|p3= [[Number]] - time  - how long the key has to be held down in seconds.|PARAMETER3=
|p3= [[Number]] - time  - how long the key has to be held down in seconds.
|p4= [[Code]] - code  - Code to be executed when key is held down for long enough.|PARAMETER4=
|p4= [[Code]] - code  - Code to be executed when key is held down for long enough.
|p5= [[Control]] - control - Optional - text control to be used in place of the default "Press X to skip" control.|PARAMETER5=
|p5= [[Control]] - control - Optional - text control to be used in place of the default "Press X to skip" control.


| None |RETURNVALUE=
| None


|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> |EXAMPLE1=
|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>


| [[BIS_fnc_holdActionAdd]], [[addAction]] |SEEALSO=
| [[BIS_fnc_holdActionAdd]], [[addAction]]


}}
}}

Revision as of 00:08, 18 January 2021

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:
Interaction

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