bomb wont defuse

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Daniel Radcliffe
Second Lieutenant
Posts: 168
Joined: Fri May 30, 2003 9:49 am

bomb wont defuse

Post by Daniel Radcliffe »

Ive started a new map with a friend and im creating the bomb/script for the new map. I have it so that the allies can planet the bombs and once both bombs have blown the allies win without any probs.

After further testing ive since found out that for some reason the axis cant defuse the bomb so once the bomb has been set it cannot to defused. Ive posted the script here to be looked at, so can someone please tell me what it is ive done wrong.
// cannonbomb
// ARCHITECTURE: us
// SCRIPTING: us
setcvar "g_obj_alliedtext1" "Destroy the main"
setcvar "g_obj_alliedtext2" "turrets"
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "Defend the turrets"
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "none"

level waittill prespawn
exec global/DMprecache.scr
level.script = maps/obj/cannonbomb.scr
exec global/ambient.scr cannonbomb
thread global/exploder.scr::main

level waittill spawn
level.defusing_team = "axis
level.planting_team = "allies"
level.targets_to_destroy = 2
level.bomb_damage = 200
level.bomb_explosion_radius = 2048
level.dmrespawning = 0
level.dmroundlimit = 1
level.clockside = axis

//level waittill roundstart

$88mm_explosive1 thread global/obj_dm.scr::bomb_thinker
$88mm_explosive2 thread global/obj_dm.scr::bomb_thinker
$88mm_explosive1 thread axis_win_timer
thread allies_win_bomb $88mm_explosive1 $88mm_explosive2
thread bomb1_exploded $88mm_explosive1
thread bomb2_exploded $88mm_explosive2

end


//*** --------------------------------------------
//*** "Bomb 1 Exploded"
//*** --------------------------------------------

bomb1_exploded local.bomb1:

while (local.bomb1.exploded != 1)

wait .1

iprintlnbold "Allies have destroyed a Cannon!"

end


//*** --------------------------------------------
//*** "Bomb 2 Exploded"
//*** --------------------------------------------

bomb2_exploded local.bomb2:

while (local.bomb2.exploded != 1)

wait .1

iprintlnbold "Allies have destroyed a Cannon!"

end

// Allied victory test
allies_win_bomb:
while(level.targets_destroyed < level.targets_to_destroy)
waitframe
teamwin allies
end

// Axis victory test
axis_win_timer:
level waittill axiswin
end
Ive obviously missed somthing out somewhere, is it possible that there is somthing in the actual map missing that could cause the problem or is it likely to be the script itself causing the problem.

Thx for your help
Virus
Lance Corporal
Posts: 19
Joined: Wed Oct 01, 2003 2:42 am
Location: UK

Post by Virus »

heres your problem :

Code: Select all

level.defusing_team = "axis
fill in the extra " after axis ;)
Daniel Radcliffe
Second Lieutenant
Posts: 168
Joined: Fri May 30, 2003 9:49 am

Post by Daniel Radcliffe »

DOH!!!!!!!
DOH!!!!!!!
DOH!!!!!!!
DOH!!!!!!!
DOH!!!!!!!
DOH!!!!!!!
DOH!!!!!!!
DOH!!!!!!!
DOH!!!!!!!
DOH!!!!!!!
DOH!!!!!!!
DOH!!!!!!!

Yeah, thx for spotting that :oops: working now :)
Virus
Lance Corporal
Posts: 19
Joined: Wed Oct 01, 2003 2:42 am
Location: UK

Post by Virus »

no prob. I normally make typo errors in my scripts.. and spend most my time reading through it because i typed it out quick! :shock:
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Dan the dummy

Post by tltrude »

I know that one will make Dan think he is stupid, but it shouldn't. It has happened to the best of us many times. You look at the line a dozen times and don't see it. It sure is nice to be able to post it so others eyes can look at the problem too!
Tom Trude,

Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

However make sure to always check your console for errors. I think mohaa will give you an error when you type "axis, and evaluate level.defusing_team to NIL (that's why you couldn't defuse actually).

Always remember the game can spot typos much quicker than you can :)
Image
Virus
Lance Corporal
Posts: 19
Joined: Wed Oct 01, 2003 2:42 am
Location: UK

Post by Virus »

Yeh, i use 'logfile 2' in the console. Or with smaller scripts enable developer in console, Scroll up and it takes you to the error. Very handy for finding mistakes/typos.
Post Reply