BIS fnc loop: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(categories)
m (Params)
Line 12: Line 12:
| param call [[BIS_fnc_loop]]; |= Syntax
| param call [[BIS_fnc_loop]]; |= Syntax


|p1= Sub-Function: [[String]] |= Parameter 1
|p1= Sub-Function: [[String]]  
:"initialize" - Initializes game loop (not required if AUTO_INITIALIZE is set to true)
:"terminate" - Terminates game loop (not required if AUTO_TERMINATE is set to true)
:"itemAdd" - Adds an item to loop
:"itemRemove" - Remove item from loop with id "uniqueId"|= Parameter 1
    
    
|p2= Parameters: [[Array]] |= Parameter 2
|p2= Parameters: [[Array]] |= Parameter 2

Revision as of 14:03, 24 March 2014

Hover & click on the images for description

Description

Description:
Loop stacked code/function with timing and conditional control. Code and conditions are executed in non-scheduled environment.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
param call BIS_fnc_loop;
Parameters:
Sub-Function: String
"initialize" - Initializes game loop (not required if AUTO_INITIALIZE is set to true)
"terminate" - Terminates game loop (not required if AUTO_TERMINATE is set to true)
"itemAdd" - Adds an item to loop
"itemRemove" - Remove item from loop with id "uniqueId"
Parameters: Array
Return Value:
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;

Additional Information

See also:
See also needed

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

Bottom Section