BIS_fnc_loop
Jump to navigation
Jump to search
Description
- Description:
- Loop stacked code/function with timing and conditional control. Code and conditions are executed in non-scheduled environment.
- Execution:
- call
- Groups:
- Program Flow
Syntax
- Syntax:
- [action, parameters] call BIS_fnc_loop
- Parameters:
- action: String - can be one of:
- "initialize" - Initializes game loop (not required as internal AUTO_INITIALIZE variable is set to true)
- "terminate" - Terminates game loop (required as internal AUTO_TERMINATE variable is not set to true)
- "itemAdd" - Adds an item to loop
- "itemRemove" - Remove item from loop with id "uniqueId"
- "onEachFrame" - internally used by "initialize"
- "itemExecute" - internally used by "onEachFrame"
- parameters: Array - used with "itemAdd" and "itemRemove" action ("itemRemove" only takes id):
- id: String - loop unique id
- code: Code or String - code to be executed
- timer: Number - (Optional, default 0) delay between executions
- timerType: String - (Optional, default "seconds") can be "seconds" or "frames"
- conditionStart: Code - (Optional, default { true }) will wait until the condition is met to start the code
- conditionEnd: Code - (Optional, default { false }) stops the loop as soon as the ending condition is met (after the end of code)
- executeOnce: Boolean - (Optional, default false)
- Return Value:
- Nothing
Examples
- Example 1:
- Example 2:
- Example 3:
- Example 4:
- Example 5:
- Example 6:
Additional Information
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