Page 1 of 1

another multiple death

Posted: Sat Jul 07, 2007 4:45 pm
by erick
I fixed most of the errors from the last post but can someone tell me why this doesn't loop.

Code: Select all

objective1:
	iprintln_noloc "An objective has been added!"
	iprintln_noloc "You can not go into the hotel until the guards have been killed."
waitthread global/objectives.scr::current_objectives 1
while (isAlive($sentry_1 || $sentry_2 || $sentry_3 || $sentry_4))
{//////////PS between isalive & (sentry_1) has been tried with a space.
////////////////////////////////////////////////////////////////it doesnt work
	wait .2
}
waitthread global/objectives.scr::add_objectives 1 3 "Kill all of the guards outside the complex.(4)"
	$maindoor_in triggerable
	$maindoor_out triggerable
thread objective2

end
It just doesn't like the code or something.
If someone knows how to script this correctly PLEASE reply! :D

Posted: Sat Jul 07, 2007 6:18 pm
by bdbodger
Maybe because isalive only accepts one paramater and it does not like your syntax maybe try this

while (isAlive($sentry_1) || isalive( $sentry_2) || isalive($sentry_3) || isalive($sentry_4))

Posted: Sat Jul 07, 2007 6:28 pm
by erick
Thanks! :D
That looks like the right code!
Your help is much appreciated! :D