Code: Select all
// Custom objective test map
// ARCHITECTURE: GrimReaper
// SCRIPTING: GrimReaper
main:
setcvar "g_obj_alliedtext1" "Steal the documents."
setcvar "g_obj_alliedtext2" "- Go get them"
setcvar "g_obj_alliedtext3" "- U know U want to"
setcvar "g_obj_axistext1" "Prevent the allies"
setcvar "g_obj_axistext2" "from stealing the"
setcvar "g_obj_axistext3" "documents."
setcvar "g_scoreboardpic" "none"
level waittill prespawn
// There is no OBJprecache.scr
exec global/DMprecache.scr
level.script = maps/obj/objtest.scr
// m6l1a is a blowing wnind sound
exec global/ambient.scr obj_team2
level waittill spawn
// Set the parameters for round based match
level.dmrespawning = 0 // 1 or 0 (0=no respawn)
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = axis // axis, allies, kills, or draw
// Comment out this line to be able to set the bomb
// when alone on the map ( just for testing )
// level waittill roundstart
// Start the win check thread for allies
thread desk_document_check
// If the end of the match is reached, the Axis win
level waittill axiswin
end // end of main
// Document checks
desk_document_check:
while(1) { // forever
// Dont execute past this line
// until someone triggers the object
$documents_trigger waittill trigger
// parm.other is the triggerer
if(parm.other.dmteam == allies) {
// Make the document graphix disappear
$documents hide
// break out of the while loop
break
}
// protection against making this
// thread use too much CPU
waitframe
}
teamwin allies // Make allies win the match
end // end allies victory test
