level waittill prespawn
level waittill spawn
$player item weapons/thompsonsmg.tik //gives you a gun
$player ammo smg 300
$player useweaponclass smg
fadein 2 0 0 0 1
wait 2
thread objectives
end
/////////////OBJECTIVES
objectives:
waitthread global/objectives.scr::add_objectives 1 2 "Kill the officer." $obj1.origin //this makes the compass point to the officer
set_objective_pos $officer //this makes the officer to be killed an objective
thread objective1
end
//////////
objective1:
waitthread global/objectives.scr::current_objectives 1
if (IsAlive $officer) //the "if" must be a lower case, MOHAA is case sensitive
$officer waittill death // if the officer is killed, then the mission will complete
thread mission_complete
end
///////////
mission_complete:
waitthread global/objectives.scr::add_objectives 1 3 "Kill the officer." $obj1.origin
waitthread global/objectives.scr::current_objectives 0 // clears objectives
iprintln_noloc "The officer has been killed. Mission complete!"
wait 1
exec global/missioncomplete.scr test_assassination 1 // loads the mission complete screen
end
Presto! I adapted the script from one of Manstein's test_winter3 map. I studied it, but not copied the script. Thanks anyway. Can any staff help me edit the scripting part? That would be helpful. Thanks.