I am making an SP map and one of the objectives is to kill the guards outside of the hotel.
There are three guards and my script goes like this but it doesnt work
objective1:
iprintln_noloc "An objective has been added!"
waitthread global/objectives.scr::current_objectives 1
if(isAlive $sentry_1 || $sentry_2 || $sentry_3)
$sentry_1 waittill death && $sentry_2 waittill death && $sentry_3 waittill death
waitthread global/objectives.scr::add_objectives 1 3 "Kill all of the guards outside the complex.(3)"
thread objective2
end
the console says that "&&" is a bad token operator or something
does anyone know how to do this without super complex scripting?
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)
wait .2
$maindoor_in triggerable //(THESE ARE FOR THE FRONT DOOR)
$maindoor_out triggerable //(these comments are not really in the script)
waitthread global/objectives.scr::add_objectives 1 3 "Kill all of the guards outside the complex.(3)"
thread objective2
end
There are no errors in the console but when i kill all of the guards and noclip through the locked front doors then the objective is marked as complete
Or could I pull out the door lock trigger lines and put them after "waitthread global/objectives.scr::add_objectives 1 3"
and before "thread objective2"
okay i took a quick glance at your script and missed the other two )'s
the problem now is that the objective is marked off as completed as soon as i start. It doesnt wait until all the bad guys are dead. Here's what it looks like now:
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))
wait .2
waitthread global/objectives.scr::add_objectives 1 3 "Kill all of the guards outside the complex.(3)"
$maindoor_in triggerable
$maindoor_out triggerable
thread objective2
end
Do you need something like this "{" around the "while ..." "wait .2"
part of the script.
I wouldnt know because i suck a scripting
this also appeared in the console and i dont know how to fix it.
the $list.origin is a list that you have to steal. It is from a script origin
with model: animate/clipboard_nopulse.tik