Page 1 of 1
An objective has been completed! ..help?
Posted: Fri Jan 17, 2003 5:05 am
by cjrs
Ok. I have a map where you're undercover in a German base. The objectives are snipe and kill an officer, then escape. I'm using the tutorial on the site to create the officer, but how would I go about making the "escape"? Triggering? And how do I get it to show up in obj list?
Posted: Fri Jan 17, 2003 11:25 am
by mohaa_rox
Ok, create a trigger multiple where you want to escape. Give it a setthread "objective2". Put a script origin with targetname "obj2" above it.
Now for the scripting:
thread objectives
objectives:
waitthread global/objectives.scr::add_objectives 1 2 "Kill the officer" $obj1.origin //your officer
//code here
waitthread global/objectives.scr::add_objectives 2 2 "Escape." $obj2.origin// the script origin used to make the compass point to the escape way.
waitthread global/objectives.scr::current_objectives 1
end
//objective 1 code here
thread obj1_complete
end
obj1_complete:
waitthread global/objectives.scr::add_objectives 1 3 "Kill the officer." $obj1.origin
end
objective2: //the setthread in the trigger
thread levelend
end
levelend:
waitthread global/objectives.scr::add_objectives 2 3 "Escape" $obj2.origin
waitthread global/objectives.scr::current_objectives 0
exec global/missioncomplete.scr
end
That's it.
Posted: Fri Jan 17, 2003 5:11 pm
by cjrs
w00t w00t, i'm beginning to love this site.