3 bombs but trying to require 2 in order to win. HELP
Posted: Sat Sep 14, 2013 5:13 am
I have spent the last 5 months building and perfecting a new custom map for mohaa, the mapping is finished ! however I can not figure out how to get the script to work the way i need it to. The map has 3 objective bombs and i need the map to end when any of the 2 bombs are destroyed. I have spent the past 2 weeks reading .map and on modT and looking through .scr's to figure out how but with no luck. So here i am begging for help !
as of now all three bombs have to be exploded for the round to end.......
as of now all three bombs have to be exploded for the round to end.......
Code: Select all
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" " Protect the Mine "
setcvar "g_obj_alliedtext2" " at all costs!"
setcvar "g_obj_alliedtext3" " "
setcvar "g_obj_axistext1" "[]Destroy Power Center"
setcvar "g_obj_axistext2" "[]Destroy Fan"
setcvar "g_obj_axistext3" "[]Destroy Substation"
setcvar "g_scoreboardpic" "deepmine"
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
level.script = maps/obj/deepmine.scr
// Initialize the exploder subsystem
exec global/exploder.scr
thread global/exploder.scr::main
thread wallbomb_wait
thread wallbomb_wait2
level waittill spawn
level.defusing_team = "allies
level.planting_team = "axis"
level.targets_to_destroy = 2
level.bomb_damage = 200
level.bomb_explosion_radius = 2048
level.dmrespawning = 1 // 1 or 0 (0=no respawn)
level.dmroundlimit = 7 // round time limit in minutes
level.clockside = allies // axis, allies, kills, or draw
// level waittill roundstart
$substation thread global/obj_dm.scr::bomb_thinker
$fanbomb thread global/obj_dm.scr::bomb_thinker
$powercenter thread global/obj_dm.scr::bomb_thinker
$substation thread axis_win_bomb $substation $fanbomb $powercenter
$substation thread allies_win_timer
end // end of main
// Axis victory test
axis_win_bomb local.bomb1 local.bomb2 local.bomb3:
while ((local.bomb1.exploded != 1) && (local.bomb2.exploded != 1) && (local.bomb3.exploded != 1))
wait .1
teamwin axis
end
// Allies victory test
allies_win_timer:
level waittill allieswin
end
// ----- ----- ----- ----- ----- -----
// ----- WALL EXPLODER --- ----- -----
// ----- ----- ----- ----- ----- -----
wallbomb_wait:
$walltrigger waittill trigger
$plunger playsound plunger
exec global/exploder.scr
$plunger anim "fire"
wait 0.8
thread global/exploder.scr::explode 1
exec global/earthquake.scr .30 12 0 0
radiusdamage $wallbomb.origin 640 384
$wallbomb remove
$walltrigger nottriggerable
println "The mine face has been comprimised!"
iprintlnbold_noloc "The mine face has been comprimised!"
end
// ----- ----- ----- ----- ----- -----
// ----- WALL EXPLODER 2 - ----- -----
// ----- ----- ----- ----- ----- -----
wallbomb_wait2:
$walltrigger2 waittill trigger
local.player = parm.other
$plunger2 playsound plunger
$plunger2 anim "fire"
wait 0.8
thread global/exploder.scr::explode 2
exec global/earthquake.scr .30 12 0 0
radiusdamage $wallbomb2.origin 640 384
$wallbomb2 remove
$walltrigger2 nottriggerable
println "The axis have blown holes under the mine!"
iprintlnbold_noloc "The axis have blown holes under the mine!"
end