Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: More conditions for "waituntil"  (Read 1551 times)

0 Members and 1 Guest are viewing this topic.

Offline AA_Chriss

  • Members
  • *
More conditions for "waituntil"
« 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!

Offline T_D

  • CWR
  • **
  • Troubleshooting Device
Re: More conditions for "waituntil"
« Reply #1 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.

Offline Luke

  • Members
  • *
  • Thank God! The OFPEC Staff are here!
Re: More conditions for "waituntil"
« Reply #2 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
Pesky Human!!
Wort Wort Wort.