SCRIPTING HELP! -
10-12-2002, 11:08 AM
I've been working on my new OBJ map, Allied Barracks, for over 2 months now, and I still can't get the right scripting for multiple bombs. I've went over every tutorial on the web, and still nothing. It's possible that I did it right, but I just can't test it. I'm a mapping vet, but a scripting noob, and I'm not sure what to do to test my script with only 1 person.
PLEASE HELP! Here's my script, if you find anything that's wrong, please tell me.
// TITLE: Allied Barracks
// ARCHITECTURE: TheShiznaeSpe
// SCRIPTING: TheShiznaeSpe
main:
exec global/exploder.scr
setcvar "g_obj_alliedtext1" "Protect the electronics post"
setcvar "g_obj_alliedtext2" "and the weapon cache!"
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "Infiltrate and destroy"
setcvar "g_obj_axistext2" " the electronics post"
setcvar "g_obj_axistext3" "and the weapon cache!"
setcvar "g_scoreboardpic" "none"
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
exec global/exploder.scr
level.script = maps/obj/Barracks(TEST).scr
exec global/ambient.scr Barracks(TEST)
level waittil spawn
thread global/exploder.scr::main
level.defusing_team = "allies"
level.planting_team = "axis"
level.targets_to_destroy = 2
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 7 // round time limit in minutes
level.clockside = allies // set to axis, allies, kills, or draw
//level waittil roundstart
$bomb.trigger_name = $trigger2
$bomb.target.target = $trigger2
$bomb.explosion_sound = "sound/weapons/explo/explo_metalmed1.wav"
$bomb2.trigger_name = $triggerbomb2
$bomb2.target.target = $triggerbomb2
$bomb2.explosion_sound = "sound/weapons/explo/explo_metalmed1.wav"
$bomb thread global/obj_dm.scr::bomb_thinker
$bomb2 thread global/obj_dm.scr::bomb_thinker
$bomb thread axis_win_timer
thread allies_win_bomb
thread bomb1_exploded $bomb
thread bomb2_exploded $bomb2
end
// this marks the end of the main thread
explode_my_bomb:
iprintlnbold_noloc "Bomb has been set , 10 seconds to detonation"
wait 2
iprintlnbold_noloc "8"
wait 2
iprintlnbold_noloc "6"
wait 2
iprintlnbold_noloc "4"
wait 1
iprintlnbold_noloc "3"
wait 1
iprintlnbold_noloc "2"
wait 1
iprintlnbold_noloc "1"
wait 1
exec global/exploder.scr::explode 1
iprintlnbold_noloc " The bomb will go off again, but no swapping of models"
end
//*** --------------------------------------------
//*** "Allies Victory"
//*** --------------------------------------------
allies_win_bomb local.bomb1:
while (local.bomb1.exploded != 1)
wait .1
teamwin allies
end
//*** --------------------------------------------
//*** "Axis Victory"
//*** --------------------------------------------
axis_win_timer:
level waittill axiswin
end
//*** --------------------------------------------
//*** "Bomb 1 Exploded"
//*** --------------------------------------------
bomb1_exploded local.bomb1:
while (local.bomb1.exploded != 1)
wait .1
iprintlnbold_noloc "The Axis has destroyed the weapon cache!"
//$spawn_axis2 disablespawn
//$spawn_axis3 enablespawn
end
//*** --------------------------------------------
//*** "Bomb 2 Exploded"
//*** --------------------------------------------
bomb2_exploded local.bomb2:
while (local.bomb2.exploded != 1)
wait .1
iprintlnbold_noloc "The Axis has destroyed the electronics post!"
//$spawn_axis2 disablespawn
//$spawn_axis4 enablespawn
end
|