How to change team that owns spawn room

game_geek123

L1: Registered
Sep 3, 2016
2
0
Hi
This has probably been asked before, but I can not find the answer anywhere. How do I change which team spawns in a spawn room when a point is caped. Or in my case I want it so that when the 3rd control point is caped then a spawn swaps from being a spawn room for Red to a spawn room for Blue.

Any help would be appreciated, this does not seem too hard but I just don't know how to do it.

Thanks
 

henke37

aa
Sep 23, 2011
2,075
515
You need to do two things. First is the actual spawn room entity. If it's tied to a capture point, just ensure that the capture point is correctly owned. If it's not tied to a capture point, set the owner manually with I/O.

Then there is the spawn points themself. I think it's the same deal, can be tied to a capture point, use I/O otherwise.
 

iiboharz

eternally tired
aa
Nov 5, 2014
857
1,291
It's unfortunately a little convoluted, but what you're going to want to do is give your spawn points in the spawn a name, make sure they're assigned a team (in this case, Red), and then clone the spawns. Make sure your cloned spawn points have a different name, and set their team (in this case, Blue). You'll want to set up your logic so that when the third control point is captured, the Red spawn points are disabled and the blue ones are enabled.

Your spawn room entities (func_respawnroom, etc) can probably have their team set to Any so that you don't have to fiddle too much with additional logic. I believe the func_respawnroom entity automatically adopts the team of whichever team the enabled spawn points inside it.

You'll have to double up on door triggers, disabling the Red filtered one and enabling the Blue filtered one as with the spawn points, too.

That's a very quick run-down and it's a bit finicky, but hopefully that helped!
 

henke37

aa
Sep 23, 2011
2,075
515
For the record, the respawn visualizers must be tied to a spawn room entity. They can't be manually set using I/O.