Page 1 of 1

Countdown time of a bomb

Posted: Wed May 26, 2004 7:13 pm
by Dave
Hi there,

I've had a look for the answer to this, but either it's not there or I've missed it.

Quite simply, how can you reduce the countdown time before a placed bomb explodes? I've got a standard objective to blow up and this all works, however I need the bomb to explode quicker to make the whole thing a little bit more playable.

Thanks in advance

Dave

bypass

Posted: Wed May 26, 2004 8:56 pm
by tltrude
You will have to make your own version of the global/obj_dm.scr script and change this variable--it's in pak0.pk3.

level.bomb_tick_time = 45

Your version of the script can be called anything you like, but make sure your script's "bomb_thinker" lines use the new script name. Place the script in a folder named global in your final pk3.

Posted: Fri May 28, 2004 6:37 pm
by Dave
Thanks for the quick reply.
Have tried this and the timer is now how I want it, however the map now doesn't restart?

I've double checked everything as per your notes, all pretty straight forward and can't see anything wrong.

Any ideas?

Dave

restart

Posted: Fri May 28, 2004 6:49 pm
by tltrude
I can't see how the two would be related. Does the restart problem go away if you change the bomb_thinker lines back? Please post your level script.

Posted: Fri May 28, 2004 7:39 pm
by Dave
Okay, just tried that. Reset back to the orignal obj_dm and map restarts.

The whole map is at http://www.futurevisions.force9.co.uk/M ... forest.pk3 (if that helps). Its only my second map so it's not going to win any prizes :-)

The only thing changed in obj_dm file was the timer to '25' and saved as forest.scr.
Script:
// Custom objective Bobby's Forest
// ARCHITECTURE: Bobby
// SCRIPTING: Bobby

main:

setcvar "g_obj_alliedtext1" "Destroy the Radio"
setcvar "g_obj_alliedtext2" "building"
setcvar "g_obj_alliedtext3" ""

setcvar "g_obj_axistext1" "Defend the Radio"
setcvar "g_obj_axistext2" "building"
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "bobby_forest"

level waittill prespawn

//*** Precache Dm Stuff
exec global/DMprecache.scr

//***Ambient sounds
level.script = maps/obj/bobby_forest_obj.scr
exec global/ambient.scr bobby_forest_obj

//***Initializes the exploder subsystem
thread global/exploder.scr::main

level waittill spawn

level.defusing_team = "axis"
level.planting_team = "allies"
level.targets_to_destroy = 1
level.bomb_damage = 200
level.bomb_explosion_radius = 2048

// set the parameters for round based match
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 // Comment out this line using '//' before it to be able to set the bomb when alone on the map ( just for testing )

$radio_bomb thread global/forest.scr::bomb_thinker // "radio_bomb" is the targetname set on the bomb in MOHRadiant

thread allies_win_bomb
$radio_bomb thread axis_win_timer

end


allies_win_bomb:

while(level.targets_destroyed < level.targets_to_destroy)
waitframe

teamwin allies
end

//*** --------------------------------------------
//*** "Axis Victory"
//*** --------------------------------------------

axis_win_timer:

level waittill axiswin

end[/img]

ok

Posted: Sat May 29, 2004 12:42 am
by tltrude
Well, you didn't tell me the map was not Mohaa. For Spearhead and Breakthrough, you will have to use the obj_dm.scr script form one of those global folders to make your version of it--they are slightly different.

Posted: Sun May 30, 2004 6:00 pm
by Dave
Ahh, didn't realise. I'll make a note for the future to mention this when posting questions.

This is now all working.

Thanks very much for you help.

Dave
:)