Executes a code once in unscheduled environment after a condition is true. It’s also possible to add a timeout >= 0, in which case a different code is executed. Then it will be waited until _timeout time has elapsed or _condition evaluates to true.
_condition | The function to evaluate as condition. <CODE> |
_statement | The function to run if the condition is true before timeout. <CODE> |
_args | Parameters passed to the functions (statement and condition) executing. (optional) <ANY> |
_timeout | If >= 0, timeout for the condition in seconds. If < 0, no timeout. Exactly 0 means timeout immediately on the next iteration.(optional, default -1) <NUMBER> |
_timeoutCode | When provided, will be executed if condition times out. (optional) <CODE> |
_this | Parameters passed by this function. Same as ‘_args’ above. <ANY> |
Nothing
[{(_this select 0) == vehicle (_this select 0)}, {(_this select 0) setDamage 1;}, [player]] call CBA_fnc_waitUntilAndExecute;
[{backpackCargo _this isEqualTo []}, { deleteVehicle _this; }, _holder, 5, {hint backpackCargo _this;}] call CBA_fnc_waitUntilAndExecute;
joko // Jonas, donated from ACE3