Help with new objective map (create a custom exploder)
Posted: Thu Jul 28, 2005 1:17 am
I tried to make an objective where the allies have to blow up a bunker (around 8 brushes that I made exploders) I went to the The Rjukan Project website and use one of Bjarne Gr?nnevik's tutorials for this...I think the scripting part is correct, and I'm more concerned about the mapping part, but I'm not sure where the problem is (I can't set the bomb even when I remove the line, "level waittill roundstart")
I'll post the script first, please post if there are any obvious errors...
Map name: obj_test (mohaa/mainta/maps/obj)
Tutorial/Script baseline found here: http://www.gronnevik.se/rjukan/index.ph ... eExplosion
^^^Also found on this site.
Otherwise, does anyone feel like taking a look at the .map?
Thanks.
I'll post the script first, please post if there are any obvious errors...
Map name: obj_test (mohaa/mainta/maps/obj)
Tutorial/Script baseline found here: http://www.gronnevik.se/rjukan/index.ph ... eExplosion
^^^Also found on this site.
Code: Select all
main:
setcvar "g_obj_alliedtext1" "Destroy"
setcvar "g_obj_alliedtext2" "The"
setcvar "g_obj_alliedtext3" "Bunker"
setcvar "g_obj_axistext1" "Defend"
setcvar "g_obj_axistext2" "The"
setcvar "g_obj_axistext3" "Bunker"
setcvar "g_scoreboardpic" "none"
level waittill prespawn
exec global/DMprecache.scr
level.script = maps/obj/obj_test.scr
exec global/ambient.scr obj_test
// Initialize the exploder subsystem
thread global/exploder.scr::main
level waittill spawn
// Axis like the bombs unplanted
level.defusing_team = "axis"
// Allies will try to plant the bombs
level.planting_team = "allies"
// Number of targets in this map
level.targets_to_destroy = 1
// Default damage of the bomb
level.bomb_damage = 200
// Default radius of bomb blast
level.bomb_explosion_radius = 2048
// Set the parameters for round based match
level.dmrespawning = 0 // 1 or 0 (0=no respawn)
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = axis // axis, allies, kills, or draw
// Comment out this line to be able to set the bomb
// when alone on the map ( just for testing )
// level waittill roundstart
$panel_bomb thread global/obj_dm.scr::bomb_thinker
// "panel_bomb" is the targetname of a bomb in Radiant
thread allies_win_bom
// Start the win check thread for allies
// Start the win check thread for axis
$panel_bomb thread axis_win_timer
end // end of main
// Allied victory test
allies_win_bomb:
// While undestroyed objectives left
while(level.targets_destroyed < level.targets_to_destroy)
{
// chill out
waitframe
}
// No objectives left allies win
teamwin allies
end // end allied victory test
// Axis victory test
axis_win_timer:
// At the end Axis win
level waittill axiswin
end // end axis victory test
Thanks.