/*don't b silly, no problems with brackets in my .scr's!!! it seems some1 4got to take out an undefined thread!!!
anyway... on a lighter note

, it's 99% there!!!
*/
//the whole script
//you can just stick this whole script in
main:
level.script = "maps/obj/MP_peenemunde_TOWnuggets.scr"
exec global/tow_dm.scr
exec global/ambient.scr m5l1b
//level.gametype = int( getcvar( g_gametype ) ) //don't know where you got this from???
//gametype 5 = Tug of War
level.gametype = 5
if ( level.gametype == 5 )
{
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Cut factory electrics"
setcvar "g_obj_alliedtext2" "Turn fuel pumps on"
setcvar "g_obj_alliedtext3" "Disable tracking radar"
setcvar "g_obj_axistext1" "Get factory electrics on"
setcvar "g_obj_axistext2" "Turn the fuel pumps on"
setcvar "g_obj_axistext3" "Enable tracking radar"
}
else
{
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Peenemunde"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" "Death! or Glory?"
setcvar "g_obj_axistext1" "Peenemunde"
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" "Death! or Glory?"
//Not a TOW game remove the bombs
$allie_bomb remove
$axis_bomb remove
}
//////////////////////////
level waittill prespawn
//////////////////////////
//////////////////////////
level waittill spawn
//////////////////////////
iprintlnbold_noloc "Welcome to [Spec Ops] JACK RUBY's house"
level.nuggetsObjectives = 0 //no objectives completed
level.switch1owner = 0 //0 meaning neutral
level.switch2owner = 0
level.switch3owner = 0
level.bRoundStarted = 0
level.axisFire = 1
// set the parameters for this round based match
level.dmrespawning = 1 // 1 or 0
level.dmroundlimit = 15 // round time limit in minutes
level.clockside = draw // set to axis, allies, kills, or draw
level.numObjectives = 3 // Number of objectives needed to
//////////////////////////
//level waittill roundstart
//////////////////////////
//If this is a tug of war game then we init all the TOW stuff
if( level.gametype == 5 )
{
//Initialize the bombs and lights
thread init_spawner_bombs
thread init_switch_lights
level.bRoundStarted = 1
}
end
////////////////////////////
// init the spawner bombs //
////////////////////////////
init_spawner_bombs:
//Allied spawner bomb
$axis_bomb thread global/tow_dm.scr::bomb_thinker "axis" maps/obj/MP_Tutorial_TOW.scr::alliesspawnpoint
$allie_bomb thread global/tow_dm.scr::bomb_thinker "allies" maps/obj/MP_Tutorial_TOW.scr::axisspawnpoint
end
//////////////////////
// hides the lights //
//////////////////////
init_switch_lights:
$obj2_light_allie hide
$obj2_light_axis hide
$obj3_light_allie hide
$obj3_light_axis hide
$obj4_light_allie hide
$obj4_light_axis hide
end
//////////////////
// the switches //
//////////////////
switch1:
if ( level.bRoundStarted == 1 )
{
if ( parm.other.dmteam == axis )
{
if (( level.switch1owner == 1 ) || ( level.switch1owner == 0 )) //1 meaning allies //0 meaning neutral
{
$obj2_light_allie hide
$obj2_light_axis show
iprintlnbold_noloc "The Axis turned on the factory electricity!"
setcvar "g_obj_alliedtext1" "Cut factory electrics"
setcvar "g_obj_axistext1" "Keep factory electrics on [x]"
level.switch1owner = -1
}
}
else
if ( parm.other.dmteam == allies )
{
if (( level.switch1owner == -1 ) || ( level.switch1owner == 0 )) //-1 meaning axis
{
$obj2_light_axis hide
$obj2_light_allie show
iprintlnbold_noloc "The Allies turned off the factory electricity!!"
setcvar "g_obj_alliedtext1" "Keep factory electrics off [x]"
setcvar "g_obj_axistext1" "Get factory electrics on"
level.switch1owner = 1
}
}
//Update team current objectives
waitthread nCheck_End_Match
}
end
switch2:
if ( level.bRoundStarted == 1 )
{
if ( parm.other.dmteam == axis )
{
if (( level.switch2owner == 1 ) || ( level.switch2owner == 0 ))
{
$obj3_light_allie hide
$obj3_light_axis show
iprintlnbold_noloc "The Axis turned on the factory electricity!"
setcvar "g_obj_alliedtext2" "Turn fuel pumps off"
setcvar "g_obj_axistext2" "Keep fuel pumps on [x]"
level.switch2owner = -1
}
}
else
if ( parm.other.dmteam == allies )
{
if (( level.switch2owner == -1 ) || ( level.switch2owner == 0 ))
{
$obj2_light_axis hide
$obj2_light_allie show
iprintlnbold_noloc "The Allies turned off the factory electricity!!"
setcvar "g_obj_alliedtext2" "Keep fuel pumps off [x]"
setcvar "g_obj_axistext2" "Turn fuel pumps on"
level.switch2owner = 1
}
}
//Update team current objectives
waitthread nCheck_End_Match
}
end
switch3:
if ( level.bRoundStarted == 1 )
{
if ( parm.other.dmteam == axis )
{
if (( level.switch3owner == 1 ) || ( level.switch3owner == 0 ))
{
$obj3_light_allie hide
$obj3_light_axis show
iprintlnbold_noloc "The Axis turned on the factory electricity!"
setcvar "g_obj_alliedtext3" "Enable tracking radar"
setcvar "g_obj_axistext3" "Keep tracking radar off [x]"
level.switch3owner = -1
}
}
else
if ( parm.other.dmteam == allies )
{
if (( level.switch3owner == -1 ) || ( level.switch3owner == 0 )) //-1 meaning axis
{
$obj4_light_axis hide
$obj4_light_allie show
iprintlnbold_noloc "The Allies turned off the factory electricity!!"
setcvar "g_obj_alliedtext3" "Keep factory electrics on [x]"
setcvar "g_obj_axistext3" "Disable tracking radar"
level.switch3owner = 1
}
}
//Update team current objectives
waitthread nCheck_End_Match
}
end
/////////////////////
// objective check //
/////////////////////
nCheck_End_Match:
level.nuggetsObjectives = ( level.switch1owner + level.switch2owner + level.switch3owner )
//iprintlnbold_noloc "what's the magic number " level.nuggetsObjectives //if this never reaches 3 or -3 then i have a few more problems
if ( level.nuggetsObjectives == 3 ) //meaning allies have reached all their objectives
{
//ignore the clock
//level ignoreclock 1
//if there is a bomb ticking stop it.
waitthread global/tow_dm.scr::StopBomb
//Allies win play the movie
teamwin allies
}
if ( level.nuggetsObjectives == -3 ) //meaning axis have reached all their objectives
{
//level ignoreclock 1
waitthread global/tow_dm.scr::StopBomb
teamwin axis
}
end
//-----------------------------------------------
// Blow up Allies Spawner
//-----------------------------------------------
axis_bomb_relay_explode:
iprintln "The Axis Spawn Point has been Destroyed!"
iprintln "The Axis Team Can No Longer Respawn!"
//$Obj_alliesspawnpoint TakeOver 1
end
//-----------------------------------------------
// Blow up Axis Spawner
//-----------------------------------------------
allie_bomb_relay_explode:
iprintln "The Allies Spawn Point has been Destroyed!"
iprintln "The Allies Team Can No Longer Respawn!"
//$Obj_axisspawnpoint TakeOver 0
end
/**
you can probably tell the bombs don't do anything as of yet... but you can win/lose now

that's the main thing

:D:D:D:D
*/