Arma 3 Scripting

BIS_fnc_holdKey

  • Runs with spawn
  • Arma 3 v1.78

Function · Markdown · JSON · original wiki page

Description

Function that executes code when a key has been held down for a long enough time - "Hold X to Advance" text is displayed when any key is pressed.

All other keys (but Esc) are deactivated until the conditions are met - only mouse controls work (character rotation and fire).

Syntax

[display, key, time, code, control] call BIS_fnc_holdKey

Parameters:

Returns: Nothing

Examples

Example 1

[findDisplay 46, 36, 5, { hint "Key 'J' pressed for 5 seconds" }] spawn BIS_fnc_holdKey; // action is added to the mission display

See also

BIS_fnc_holdActionAdd · addAction · BIS_fnc_keyHold