AXIS Obj fubar

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
Gen Cobra
Major General
Posts: 739
Joined: Tue Jan 28, 2003 4:26 pm

AXIS Obj fubar

Post by Gen Cobra »

Where in this script am i going wrong? How come the axis win anyway if the time runs out? They get the score 2. Please help me figure this out.

Code: Select all

main:


setcvar "g_obj_alliedtext1" "Defend Airline" 
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" "" setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" "Plant Bomb"
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "textures/mohmenu/dmloading/cna2.tga"


level waittill prespawn
exec global/exploder.scr
exec global/door_locked.scr
exec global/bomber.scr
exec global/DMprecache.scr
level.script = maps/obj/city_nights_airportobj.scr
level.music="city_nights_airportobj"
exec global/ambient.scr city_nights_airportobj
thread global/exploder.scr::main // Initialize the exploder subsystem
thread fan1
thread fan2 
thread fan3
level.flyplane=1


fan1:
$blade1 bind $fan1
$blade2 bind $fan1
$blade3 bind $fan1
$blade4 bind $fan1
$fan1 rotatey 120


fan2:
$blade5 bind $fan2
$blade6 bind $fan2
$blade7 bind $fan2
$blade8 bind $fan2
$fan2 rotatex 110


fan3:
$blade9 bind $fan3
$blade10 bind $fan3
$blade11 bind $fan3
$blade12 bind $fan3
$blade13 bind $fan3
$fan3 rotatey 25

level waittill spawn

level.defusing_team = "allies" // Axis like the bombs unplanted
level.planting_team = "axis" // 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 = 1 // 1 or 0 (0=no respawn)
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw


// level waittill roundstart // Comment out this line using '//' before it to be able to set the bomb when alone on the map ( just for testing )


$panel_bomb thread global/obj_dm.scr::bomb_thinker // "panel_bomb" is the targetname set on the bomb in MOHRadiant
thread axis_win_bomb // Start the win check thread for allies
$panel_bomb thread allies_win_timer // Start the win check thread for axis
end // end of main

// Axis victory test


axis_win_bomb:
while(level.targets_destroyed < level.targets_to_destroy) // While undestroyed objectives left
waitframe // chill out
teamwin axis
end

// Allies victory test


allies_win_timer:
level waittill allieswin 
end
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Code: Select all

level.clockside = axis
That makes axis win at round end
Admin .MAP Forums
Image
Head above heels.
User avatar
Gen Cobra
Major General
Posts: 739
Joined: Tue Jan 28, 2003 4:26 pm

Post by Gen Cobra »

Thanks man im glad u saw this considering u wrote the allies one. How do I add another objective? Thanks again. 8-)
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

If its another bomb: just set level.targets_to_destroy = 2 ( along with the bomb setup naturally )
This will work because of the exelent way your win test thread is designed. 8-)
If its another form of objective: http://www.planetmedalofhonor.com/rjuka ... ctive.html
(the tutorial also contains multiple bombs acrually)
Admin .MAP Forums
Image
Head above heels.
Post Reply