ENABLE / DISABLE spaws
Moderator: Moderators
ENABLE / DISABLE spaws
if i disable the spawns of the entire axis team, will the game just crash?
awwww crap. i wanted to know because i wanted to make it so that when this happens, axis cant spawn anymore. think of battlefield1942 when you have no more spawn flags.
i guess ill just have to stick to making a "void" room in which they spawn into, then from there, i make a door that allows/denies them from re-entering the battle.
Dude, real easy to do and you're on the right track. I've done it in the 'Gun Assault' map a mess of ways. In that one, spawners are turned on/off by switches in a particular sequence.
All you need is to have an event happen, blow up the truck, flip a switch, whatever...the typical 'spawner/bomber' stuff fixes that automatically for you via the game scripts. Outside of that you need to use these commands:
$targetname enablespawn or $targetname disablespawn (where $targetname is the entity name for EACH team spawner).
You have to have a trigger of some type, doesn't matter, and it is best to use a 'setthread' command to turn on/off the spawners.
Next, the game will not crash. . . nor will the team respawn at the player/info. If the Axis team is turned off, the dead players simply hang in limbo like in a ture OBJ map and wait until everyone dies. IF you are in DM mode, you will have to wait for the server to reset or for time to expire.
IF you want to do something like this, I suggest two things: first give each team a way to 'recapture' their spawner switch, or stick to making straight TOW or OBJ maps that have other 'win' options besides 'time/clock'. There's some other ways, but I'm keeping that to myself right now as I'm trying to pioneer this 'Dynamic TDM' style.
All you need is to have an event happen, blow up the truck, flip a switch, whatever...the typical 'spawner/bomber' stuff fixes that automatically for you via the game scripts. Outside of that you need to use these commands:
$targetname enablespawn or $targetname disablespawn (where $targetname is the entity name for EACH team spawner).
You have to have a trigger of some type, doesn't matter, and it is best to use a 'setthread' command to turn on/off the spawners.
Next, the game will not crash. . . nor will the team respawn at the player/info. If the Axis team is turned off, the dead players simply hang in limbo like in a ture OBJ map and wait until everyone dies. IF you are in DM mode, you will have to wait for the server to reset or for time to expire.
IF you want to do something like this, I suggest two things: first give each team a way to 'recapture' their spawner switch, or stick to making straight TOW or OBJ maps that have other 'win' options besides 'time/clock'. There's some other ways, but I'm keeping that to myself right now as I'm trying to pioneer this 'Dynamic TDM' style.
Sounds like it would be best just to tie the spawners to the explosion and use the spawner/bomb setting like in stock maps, then end the map. If you're blocking the only escape route, you're gonna have to either open another, although difficult one or have a bunch of grenade chucking going on over the obstacle. Sorry, doesn't seem practical to me unless you can better explain it. Also, if you're NEVER going to reactivate the spawners, you could just use the 'remove' command.
nonono theres a canyon pass and a checkpoint. axis spawn behind canyon pass and run thru it, and go to checkpoint. if allies bomb canyon pass, all dead axis cannot respawn, and the ones left alive must stay alive for timer to run out. all i need to know is if i disable all axis spawns, the dead axis cant respawn, but the allies still can?
Right, when you 'disable' the spawns, they're off. Make sure that all of them share the same '$targetname' though.
Best way is to create one Axis spawn and name it something like:
key: $targetname
value: Axis_spawner
Copy it and paste as many as you need. Then in the thread that blows up the pass, add a line:
"$Axis_spawner disablespawn"
Best way is to create one Axis spawn and name it something like:
key: $targetname
value: Axis_spawner
Copy it and paste as many as you need. Then in the thread that blows up the pass, add a line:
"$Axis_spawner disablespawn"
