BIS fnc CPWaitUntil: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects? in MP|Multiplayer Effects( \("local" or "gl...)
m (Text replacement - "(\|p[0-9]+ *= *[^(]+\(Optional(, default[^)]*)\) )I([a-z])" to "$1i$3")
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function
{{RV|type=function


| arma3
|game1= arma3
|version1= 1.72


|1.72
|gr1= CombatPatrol


|gr1 = CombatPatrol
|gr2= Program Flow


|gr2 = Program Flow
|descr= Function waits until condition becomes true. Condition is checked with given interval.


<!---|arg= local |Multiplayer Arguments=--->
|s1= [condition, interval] spawn [[BIS_fnc_CPWaitUntil]]


<!---|eff= local |Multiplayer Effects=--->
|p1= condition: [[Code]] - (Optional, default <sqf inline>{ true }</sqf>) condition to be checked


| Function waits until condition becomes true. Condition is checked with given interval.
|p2= interval: [[Number]] - (Optional, default 0.5) interval in which the condition will be checked


|[condition, interval] spawn [[BIS_fnc_CPWaitUntil]]
|r1= [[Nothing]]


|p1= condition: [[Code]] - (Optional, default {{Inline code|{ [[true]] }<nowiki/>}}) Condition to be checked
|x1= <sqf>[{ not alive player }, 2] spawn BIS_fnc_CPWaitUntil;</sqf>
 
|p2= interval: [[Number]] - (Optional, default 0.5) Interval in which the condition will be checked
 
| [[Nothing]]
 
|x1= <code>[<nowiki/>{ [[not]] [[alive]] [[player]] }, 2] [[spawn]] [[BIS_fnc_CPWaitUntil]];</code>


|exec= spawn
|exec= spawn


| [[waitUntil]]
|seealso= [[waitUntil]]
}}
}}

Latest revision as of 12:29, 8 November 2023

Hover & click on the images for description

Description

Description:
Function waits until condition becomes true. Condition is checked with given interval.
Execution:
spawn
Groups:
CombatPatrolProgram Flow

Syntax

Syntax:
[condition, interval] spawn BIS_fnc_CPWaitUntil
Parameters:
condition: Code - (Optional, default { true }) condition to be checked
interval: Number - (Optional, default 0.5) interval in which the condition will be checked
Return Value:
Nothing

Examples

Example 1:
[{ not alive player }, 2] spawn BIS_fnc_CPWaitUntil;

Additional Information

See also:
waitUntil

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