Stifler S.K. Mar 23 @ 1:46pm
tank dies if spawns too far
Hey I made a survival map where the spawn nav is far from the survivors .. but the tank is dying because of that '
Is there a way (script) to make the tank not die if it is far away ?

I will put your name in the map description if you help me :3
Showing 1-3 of 3 comments
< >
Boiled In Cum Mar 24 @ 2:40am 
I have a similar problem at the finale of one of my campaigns, and I haven't been able to fix it. However, I do have a new idea the might work. The info_director entity has an input to disable the tank frustration timer, preventing it from dying. If you detect a tank spawn, you could disable the frustration timer, and then enable it after a set time, to prevent it from living forever if it gets stuck/kited.

There are a few ways of detecting tank spawns and deaths I can think of, but they are all a bit complicated. The best way is probably to use a vscript with a game event callback for the tank spawning, but it requires mutation mode to be enabled. Another option is to perodically poll Director.IsTankInPlay(), but it might not always detect if the tank dies, so you might not be able to tell when a new tank spawns. It could also be possible to do it all with map I/O, with a trigger_multiple triggering when a tank spawns, and then polling it for the death with TouchTest.
Last edited by Boiled In Cum; Mar 24 @ 2:41am
Stifler S.K. Mar 24 @ 3:02am 
Originally posted by Rectus:
I have a similar problem at the finale of one of my campaigns, and I haven't been able to fix it. However, I do have a new idea the might work. The info_director entity has an input to disable the tank frustration timer, preventing it from dying. If you detect a tank spawn, you could disable the frustration timer, and then enable it after a set time, to prevent it from living forever if it gets stuck/kited.

There are a few ways of detecting tank spawns and deaths I can think of, but they are all a bit complicated. The best way is probably to use a vscript with a game event callback for the tank spawning, but it requires mutation mode to be enabled. Another option is to perodically poll Director.IsTankInPlay(), but it might not always detect if the tank dies, so you might not be able to tell when a new tank spawns. It could also be possible to do it all with map I/O, with a trigger_multiple triggering when a tank spawns, and then polling it for the death with TouchTest.


isn't there any way to spawn tank only on a certain NAV ?
Boiled In Cum Mar 24 @ 3:15am 
Not really, there is a NOTHREAT nav attribute that should prevent tanks spawning, but depending on how the spawns are programmed in survival, it might not work. In campaigns it randomly marks areas with THREAT along the escape route, and spawns bosses there, but in scripted panic events it might spawn them the same way SI spawn.

Another option would be to disable tank spawns with the director option ProhibitBosses = true and spawn the tanks manually with a info_zombie_spawn.
Showing 1-3 of 3 comments
< >
Per page: 15 30 50
Date Posted: Mar 23 @ 1:46pm
Posts: 3