BIS fnc CPWaitUntil: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|Game version=" to "|Game version= |gr1 = CombatPatrol |GROUP1=")
m (page filled)
Line 6: Line 6:


|gr1 = CombatPatrol |GROUP1=
|gr1 = CombatPatrol |GROUP1=
|gr2 = Program Flow |GROUP2=


<!---|arg= local |Multiplayer Arguments=--->
<!---|arg= local |Multiplayer Arguments=--->
Line 11: Line 13:
<!---|eff= local |Multiplayer Effects=--->
<!---|eff= local |Multiplayer Effects=--->


| <pre>/*
| Function waits until condition becomes true. Condition is checked with given interval. |Description=
Author: Josef Zemanek


Description:
|[condition, interval] call [[BIS_fnc_CPWaitUntil]]|Syntax=
Combat Patrol optimized waitUntil, no need to call it every frame sometimes
*/</pre>{{placeholder}}<!-- Remove this after fill-in --> |Description=


|[] call [[BIS_fnc_CPWaitUntil]]|Syntax=
|p1= condition: [[Code]] - (Optional, default {[[true]]}) Condition to be checked |Parameter 1=


|p1= parameter: Datatype - (Optional, default defValue) description |Parameter 1=
|p2= interval: [[Number]] - (Optional, default 0.5) Interval in which the condition will be checked |Parameter 2=


|Datatype - description|Return value=
| [[Nothing]] |Return value=


|x1= <code></code>|Example 1=
|x1= <code><nowiki>[</nowiki>[[not]] [[alive]] [[player]], 2] [[spawn]] [[BIS_fnc_CPWaitUntil]];</code>|Example 1=


|exec= call |Execution=
|exec= spawn|Execution=


| |See also=
| [[waitUntil]] |See also=
}}
}}



Revision as of 10:58, 18 October 2020

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] call 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