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
thread global/exploder.scr::main
level waittill spawn
level.defusing_team = "axis" // Axis like the bombs unplanted
level.planting_team = "allies" // Allies will try to plant the bombs
level.targets_to_destroy = 1 // Number of targets in this map
level.bomb_damage = 200 // Default damage of the bomb
level.bomb_explosion_radius = 2048 // Default radius of bomb blast
// 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
$panel_bomb thread global/obj_dm.scr::bomb_thinker // "panel_bomb" is the targetname set on the bomb in MOHRadiant
thread allies_win_bomb // Start the win check thread for allies
$panel_bomb thread axis_win_timer // Start the win check thread for axis
// 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
