another multiple death

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
erick
Major
Posts: 280
Joined: Wed May 30, 2007 1:14 am
Location: USA

another multiple death

Post 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
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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))
Image
User avatar
erick
Major
Posts: 280
Joined: Wed May 30, 2007 1:14 am
Location: USA

Post by erick »

Thanks! :D
That looks like the right code!
Your help is much appreciated! :D
Post Reply