Two-bomb Objective Help

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Penguin!
Private
Posts: 1
Joined: Sun Dec 21, 2003 4:35 am

Two-bomb Objective Help

Post by Penguin! »

I'm sorry, I'm sure this has been asked before, but I searched the forums and couldn't find an answer. I'm trying to create an objective map with the objective similar to V2 -- the allies have to plant two separate bombs with separate timers that blow up separate objects -- a 15cm cannon and a 20mm flak. The allies win by blowing up both objectives. Only one of my bombs works. One bomb can be set and detonates accordingly, but the other one won't plant. I've checked the map itself and everything seems to be in order with the detonators so I figure it must be my scripting. Here's the script for the map right now.

--------------------------------------------------

// Sky Tower 2 - Objective Version
// ARCHITECTURE: Alan "Penguin!" N.
// SCRIPTING: Alan "Penguin!" N.
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Destroy the cannons"
setcvar "g_obj_alliedtext2" "at the top of the"
setcvar "g_obj_alliedtext3" "tower."
setcvar "g_obj_axistext1" "Don't fall!"
setcvar "g_obj_axistext2" "Defend the cannons."
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "none"
exec global/exploder.scr
level waitTill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
level.script = maps/dm/SkyTower2obj.scr
exec global/ambient.scr SkyTower2obj
//$world farplane 5000
//$world farplane_color (.333 .333 .329)
level waittill spawn
level.bomb_damage = 200
level.bomb_explosion_radius = 640
level.defusing_team = "axis"
level.planting_team = "allies"
level.targets_to_destroy = 2
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw
level waittill roundstart

$15cmcannon_explosive1 thread global/obj_dm.scr::bomb_thinker

$15cmcannon_explosive1 thread axis_win_timer
thread allies_win_bomb

end

$20mmflak_explosive1 thread global/obj_dm.scr::bomb_thinker

$20mmflak_explosive1 thread axis_win_timer
thread allies_win_bomb

end

//*** --------------------------------------------
//*** "Axis Victory"
//*** --------------------------------------------
axis_win_timer:
level waittill axiswin
end
//*** --------------------------------------------
//*** "Allied Victory"
//*** --------------------------------------------
allies_win_bomb:
while(level.targets_destroyed < level.targets_to_destroy)
waitframe
teamwin allies

end

---------------------------------------------------
I can't figure out what I noobed... :?
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Code: Select all

$15cmcannon_explosive1 thread global/obj_dm.scr::bomb_thinker

$15cmcannon_explosive1 thread axis_win_timer
thread allies_win_bomb

end

$20mmflak_explosive1 thread global/obj_dm.scr::bomb_thinker

$20mmflak_explosive1 thread axis_win_timer
thread allies_win_bomb

end 
should be

Code: Select all

  $15cmcannon_explosive1 thread global/obj_dm.scr::bomb_thinker
  $20mmflak_explosive1 thread global/obj_dm.scr::bomb_thinker

  thread allies_win_bomb

end 
Image
Post Reply