Arma 3 Scripting

Function in Interaction

BIS_fnc_keyHold

Also available as Markdown and JSON, or read the original wiki page.

Description

Allows for hold button interactions. Hold action is started by pressing Space.

Syntax

[description, duration, condition, arguments, loaded] spawn BIS_fnc_keyHold

Parameters:

Returns: - spawn: Script Handle

Examples

Example 1

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

Example 2

Function can be called in scheduled environment to return values and be used for further code execution.

0 spawn {
    private _success = ["Hold that key!", 2, { alive player }] call BIS_fnc_keyHold;
    if (_success) then { hint "Function executed" } else { hint "Function interrupted" };
};

See also

BIS_fnc_holdActionAdd · BIS_fnc_holdKey