BIS fnc CPWaitUntil: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (rollback)
m (Text replacement - "(\|p[0-9]+ *= *[^(]+\(Optional(, default[^)]*)\) )I([a-z])" to "$1i$3")
 
(22 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Function|= Comments
{{RV|type=function


| arma3 |Game name=
|game1= arma3
|version1= 1.72


|1.72|Game version=
|gr1= CombatPatrol


<!---|arg= local |Multiplayer Arguments=--->
|gr2= Program Flow


<!---|eff= local |Multiplayer Effects=--->
|descr= Function waits until condition becomes true. Condition is checked with given interval.


| <pre>/*
|s1= [condition, interval] spawn [[BIS_fnc_CPWaitUntil]]
Author: Josef Zemanek


Description:
|p1= condition: [[Code]] - (Optional, default <sqf inline>{ true }</sqf>) condition to be checked
Combat Patrol optimized waitUntil, no need to call it every frame sometimes
*/</pre>{{Informative|Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]]}} |Description=


|[] call [[BIS_fnc_CPWaitUntil]]|Syntax=
|p2= interval: [[Number]] - (Optional, default 0.5) interval in which the condition will be checked


|p1= parameter: Datatype - (Optional, default defValue) description |Parameter 1=
|r1= [[Nothing]]


|Datatype - description|Return value=
|x1= <sqf>[{ not alive player }, 2] spawn BIS_fnc_CPWaitUntil;</sqf>


|x1= <code></code>|Example 1=
|exec= spawn


|exec= call |Execution=
|seealso= [[waitUntil]]
 
| |See also=
}}
}}
[[Category:Function Group: CombatPatrol|{{uc:CPWaitUntil}}]]
[[Category:Functions|{{uc:CPWaitUntil}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:CPWaitUntil}}]]

Latest revision as of 13: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