TRIGGERS: Show/Hide versus Triggerable/Nottriggerable
Posted: Wed Jun 25, 2003 2:50 pm
What I'm working on is a progressive spawn system that forces each team to maintain a continuous line of communication. I.e., they can't run ahead and get OBJ#2 until they secure OBJ#1... I have 3 OBJ switches, each set up in TOW mode (this actually going to be used in TOW & TDM play) that function perfectly. BUT, I want to be able to 'disable' the switches until the one before or after them is tripped. Bascially, OBJ#3 is in the middle, and if the AXIS control it, OBJ#1, 4 & 5 should be inactive, but #2 should be open... if ALLIES control #3, then #1, 2 & 5 should be inactive, with #4 now open to their advance.
Make sense?? I have four progressive spawn regions tied to the switches, making a really good flow to the map. Here's a sample using the SHOW/HIDE that I can easily use on normal brushes, but would the TRIGGERABLE/NOTTRIGGERABLE commands work better? OR have to be used?? Any ideas?
//--------------------------------------------------------------
// Move the switch handle - OBJ3
//--------------------------------------------------------------
moveobj3:
$obj3_switch_trigger nottriggerable
$obj3_switch bind $obj3_switch_origin
if( level.obj3_switch_up == 1 )
{
$obj3_switch_origin speed 1.0
$obj3_switch_origin rotatezdownto 180
$obj3_switch_origin waitmove
$obj3_switch_origin playsound switchbox
level.obj3_switch_up = 2
$spawn_allied3 enablespawn
$spawn_allied2 disablespawn
$spawn_axis2 disablespawn
$spawn_axis3 enablespawn
$obj4_switch_trigger show
$obj2_switch_trigger hide
}
else
{
$obj3_switch_origin speed 1.0
$obj3_switch_origin rotatezupto 0
$obj3_switch_origin waitmove
$obj3_switch_origin playsound switchbox
level.obj3_switch_up = 1
$spawn_allied2 enablespawn
$spawn_allied3 disablespawn
$spawn_axis3 disablespawn
$spawn_axis2 enablespawn
$obj2_switch_trigger show
$obj4_switch_trigger hide
}
$obj3_switch_trigger triggerable
end
Make sense?? I have four progressive spawn regions tied to the switches, making a really good flow to the map. Here's a sample using the SHOW/HIDE that I can easily use on normal brushes, but would the TRIGGERABLE/NOTTRIGGERABLE commands work better? OR have to be used?? Any ideas?
//--------------------------------------------------------------
// Move the switch handle - OBJ3
//--------------------------------------------------------------
moveobj3:
$obj3_switch_trigger nottriggerable
$obj3_switch bind $obj3_switch_origin
if( level.obj3_switch_up == 1 )
{
$obj3_switch_origin speed 1.0
$obj3_switch_origin rotatezdownto 180
$obj3_switch_origin waitmove
$obj3_switch_origin playsound switchbox
level.obj3_switch_up = 2
$spawn_allied3 enablespawn
$spawn_allied2 disablespawn
$spawn_axis2 disablespawn
$spawn_axis3 enablespawn
$obj4_switch_trigger show
$obj2_switch_trigger hide
}
else
{
$obj3_switch_origin speed 1.0
$obj3_switch_origin rotatezupto 0
$obj3_switch_origin waitmove
$obj3_switch_origin playsound switchbox
level.obj3_switch_up = 1
$spawn_allied2 enablespawn
$spawn_allied3 disablespawn
$spawn_axis3 disablespawn
$spawn_axis2 enablespawn
$obj2_switch_trigger show
$obj4_switch_trigger hide
}
$obj3_switch_trigger triggerable
end