Ok guys, here's a bugger: I have my 'Gun Assault' map you all are tired of hearing about, but I have some issues.
Originally set up as a TOW, it works great. I have four spawn regions per team that they can advance with each objective allowing for 3 distinct regions of fighting on one map and a real 'ebb and flow' effect. In trying to port it to true DM play, however, there are issues. I got it working with most of the TOW stuff still in the script. But you cannot change teams at any point...trying takes you to 'spectator' until the end of the round.
I thought that I could beat that effect. The map path is /obj/mapname_tow where it works. Changing to true DM and I loose all audio cues tied to when a switch changes control and then you can repeatedly pull a switch flipping the spawn controllers all over the place wrecking the progression.
Here's a portion of the script; it's still in the TOW format, but plays under DM:
//----------------------------------------------------------
// Main
//----------------------------------------------------------
main:
level.script="maps/obj/MP_GunAssault_TOW.scr"
setcvar "g_scoreboardpic" "none"
//Exec our helper scripts
exec global/tow_dm.scr
exec global/ambient.scr MP_GunAssault_TOW
thread global/minefield.scr::minefield_setup
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Gun Assault TDM"
setcvar "g_obj_alliedtext2" "by: Mark 'Slyk' Dittman"
setcvar "g_obj_alliedtext3" "June, 2003"
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" "Fight for control"
setcvar "g_obj_axistext3" "of each objective!"
//////////////////////////
level waittill prespawn
//////////////////////////
$world farplane_color ".466667 .537255 .709804"
level.fogplane = 4086 //4608
$world farplane level.fogplane
$world farplane_cull 0
thread set_allied_spawns
thread set_axis_spawns
thread set_collisionents
//thread set_mg42s
//////////////////////////
level waittill spawn
//////////////////////////
// set the parameters for this round based match
level.bRoundStarted = 0
level.dmrespawning = 1 // 1 or 0
level.clockside = allies // set to axis, allies, kills, or draw
level.dmroundlimit = 20 // round time limit in minutes
level.numObjectives = 5 // Number of objectives needed to win
level.obj1_switch_up = 1 //1=up, 2=down
level.obj2_switch_up = 1 //1=up, 2=down
level.obj3_switch_up = 1 //1=up, 2=down
level.obj4_switch_up = 1 //1=up, 2=down
level.obj5_switch_up = 1 //1=up, 2=down
thread set_objectives
thread set_hints
thread set_spawner_triggers
obj1_switch_trigger remove
obj5_switch_trigger remove
//////////////////////////
//level waittill roundstart
//////////////////////////
level.bRoundStarted = 1
end
//-----------------------------------------------
// Init the Spawner Triggers
//-----------------------------------------------
set_spawner_triggers:
$obj3_switch_trigger nottriggerable
$obj4_switch_trigger nottriggerable
$obj5_switch_trigger nottriggerable
end
//-----------------------------------------------
// Init the ALLIED Spawn Locations
//-----------------------------------------------
set_allied_spawns:
$spawn_allied1 enablespawn
$spawn_allied2 disablespawn
$spawn_allied3 disablespawn
$spawn_allied4 disablespawn
end
//-----------------------------------------------
// Init the AXIS Spawn Locations
//-----------------------------------------------
set_axis_spawns:
$spawn_axis1 enablespawn
$spawn_axis2 disablespawn
$spawn_axis3 disablespawn
$spawn_axis4 disablespawn
end
//***********************************************************
//----------------------------------------------------------
//Set the teams current objectives
//----------------------------------------------------------
set_objectives:
//First lets do the allies
if( $obj2.ControlledBy == 0 )
{
$obj2 SetCurrent 1
}
else if( $obj3.ControlledBy == 0 )
{
$obj3 SetCurrent 1
}
else if( $obj4.ControlledBy == 0 )
{
$obj4 SetCurrent 1
}
else if( $obj5.ControlledBy == 0 )
{
$obj5 SetCurrent 1
}
//Now the Axis
if( $obj1.ControlledBy == 1 )
{
$obj1 SetCurrent 0
}
else if( $obj2.ControlledBy == 1 )
{
$obj2 SetCurrent 0
}
else if( $obj3.ControlledBy == 1 )
{
$obj3 SetCurrent 0
}
else if( $obj4.ControlledBy == 1 )
{
$obj4 SetCurrent 0
}
end
//----------------------------------------------------------
// TAKE CONTROL OF OBJECTIVE 2 - - ESTATE HOUSE
//----------------------------------------------------------
obj2:
if( parm.other.dmteam == allies )
{
if( $obj2.ControlledBy != 1 )
{
//Flip the switch
thread moveobj2
//Take the objective
$obj2 TakeOver 1
iprintln "The Allies have control of the Estate House!"
//Update team current objectives
//thread set_objectives
}
}
else if( parm.other.dmteam == axis )
{
if( $obj2.ControlledBy != 0 )
{
//Flip the switch
thread moveobj2
//Take the objective
$obj2 TakeOver 0
iprintln "The Axis have control of the Estate House!"
//Update team current objectives
//thread set_objectives
}
}
end
//--------------------------------------------------------------
// Move the switch handle - OBJ2
//--------------------------------------------------------------
moveobj2:
$obj2_switch_trigger nottriggerable
$obj2_switch bind $obj2_switch_origin
if( level.obj2_switch_up == 1 )
{
$obj2_switch_origin speed 1.0
$obj2_switch_origin rotatezdownto 180
$obj2_switch_origin waitmove
$obj2_switch_origin playsound switchbox
level.obj2_switch_up = 2
$spawn_allied2 enablespawn
$spawn_allied1 disablespawn
$spawn_axis1 disablespawn
$spawn_axis2 enablespawn
$obj3_switch_trigger triggerable
$obj1_switch_trigger nottriggerable
}
else
{
$obj2_switch_origin speed 1.0
$obj2_switch_origin rotatezupto 0
$obj2_switch_origin waitmove
$obj2_switch_origin playsound switchbox
level.obj2_switch_up = 1
$spawn_axis1 enablespawn
$spawn_axis2 disablespawn
$spawn_allies1 enablespawn
$spawn_allies2 disablespawn
$obj3_switch_trigger nottriggerable
$obj1_switch_trigger triggerable
}
$obj2_switch_trigger triggerable
end
PROGRESSIVE SPAWN ISSUES >> NEW MAP TYPE???
Moderator: Moderators