Alliedassault

Alliedassault (alliedassault.us/index.php)
-   MoH Maps, Mods & Skins (alliedassault.us/forumdisplay.php?f=11)
-   -   SCRIPTING HELP! (alliedassault.us/showthread.php?t=10358)

TheShiznaeSpe 10-12-2002 10:08 AM

SCRIPTING HELP!
 
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

TheShiznaeSpe 10-14-2002 03:25 PM

CAN ANYONE HELP?
 
PLEASE!?

Surgeon 10-14-2002 03:34 PM

[quote:7edc4]level.script = maps/obj/Barracks(TEST).scr
exec global/ambient.scr Barracks(TEST) [/quote:7edc4]

I think this is whats causing the problems - try renaming your map - barracks_test.bsp - and change the above to

level.script = maps/obj/Barracks_test.scr
exec global/ambient.scr Barracks_test

TheShiznaeSpe 10-14-2002 05:50 PM

Thank you, but
 
I changed the titles and everything, but it still don't work. I messed around with the script: nothing. The weird thing is that nothing is showing up. Not even the scoreboard messages (they never did). I'm convinced it's either the map, or, most likely, a small glitch in the script.

TheShiznaeSpe 10-14-2002 07:04 PM

MORE PROBLEMS!
 
Now it says, in the console, that the Barracks.src could not be loaded properly. Any ideas?


All times are GMT -6. The time now is 05:44 AM.

Powered by vBulletin® Version 3.8.12 by ScriptzBin
Copyright ©2000 - 2025, vBulletin Solutions Inc.
© 1998 - 2007 by Rudedog Productions | All trademarks used are properties of their respective owners. All rights reserved.