OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: AA_Chriss on 23 Nov 2008, 17:22:22

Title: More conditions for "waituntil"
Post by: AA_Chriss on 23 Nov 2008, 17:22:22
Hello, is it possible to have more conditions for a "waituntil"?
I have made a little airtaxi script for my mission and it waits until the crew count is great than "1".
However when there is no player getting in, i want to let it fly away after 5 minutes even when no-one is getting in.

So can i make 2 conditions for waituntil?
If so, how?

Thanks very much!
Title: Re: More conditions for "waituntil"
Post by: T_D on 23 Nov 2008, 17:30:18
Code: [Select]
_startTime = time;
waitUntil
{
_cond1 = count crew heli > 1;
_cond2 = time - _startTime > 5*60;
_cond1 || _cond2
};

This basically means: waitUntil _cond1 or _cond2 is true.
Title: Re: More conditions for "waituntil"
Post by: Luke on 24 Nov 2008, 07:02:23
also try:
Code: [Select]
_startTime = time;
waitUntil
{
_cond1 = count crew heli > 1;
_cond2 = time - _startTime > 5*60;
_cond1 && _cond2
};

To wait till both are true.

Luke