Arma 3 Scripting

Function in Program Flow

BIS_fnc_loop

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

Description

Loop stacked code/function with timing and conditional control. Code and conditions are executed in non-scheduled environment.

Syntax

[action, parameters] call BIS_fnc_loop

Parameters:

Returns: Nothing

Examples

Example 1

// hints time every five seconds
["itemAdd", ["uniqueId", { hint str time; }, 5]] call BIS_fnc_loop;

Example 2

// removes stacked loop with id of uniqueId
["itemRemove", ["uniqueId"]] call BIS_fnc_loop;

Example 3

// hints time every frame after BIS_variable is assigned
["itemAdd", ["uniqueId", { hint str time; }, nil, nil, { !isNil { BIS_variable } }]] call BIS_fnc_loop;

Example 4

// hints time every five seconds after BIS_variable is assigned
["itemAdd", ["uniqueId", { hint str time; }, 5, "seconds", { !isNil { BIS_variable } }]] call BIS_fnc_loop;

Example 5

// hints time every frame
["itemAdd", ["uniqueId", { hint str time; }]] call BIS_fnc_loop;

Example 6

// remove item from loop with id "uniqueId"
["itemRemove", ["uniqueId"]] call BIS_fnc_loop;

See also

for · forEach · while