Restricting team/classes?

cownaetion

L1: Registered
Feb 24, 2008
32
1
Hi, I'm brand-new to map making for TF2 and there aren't any good tutorials at all on setting up entities and properties, or none that I have found at least. I was wondering if anyone knew how to allow only one team to spawn, and restrict the type of classes allowed as well? Thanks for your time.
 

Pseudo

L6: Sharp Member
Jan 26, 2008
319
150
Spawning is controlled by info_player_teamspawn entities. You set which team you want to spawn at the points, so you would put all of the Red teamspawns in one area and the Blue in another. I'm not sure what you mean by only allowing one team to spawn. You would want players to only be able to play as one team? You could have one team spawn in an area that is blocked off from rest of the map I guess. You also might be interested in increasing the respawn time for a team using the tf_gamerules entity described here. For making things such as doors work for only one team use a filter_activator_tfteam entity, see this example.

Restricting the classes is a bit complicated because there's not a built-in way to do this. A workaround is to send a point_clientcommand a join_class command to force a player to respawn as a certain class. A map could have a door for each class that is allowed and each door would have a trigger_multiple that would make a player of the wrong class respawn. I would recommend that instead of using these methods you try to make a map that is balanced for all classes.
 

cownaetion

L1: Registered
Feb 24, 2008
32
1
I've tried the info_team_spawn entities along with the spawn room and yet it still allows both teams to spawn. I'll try the tf_gamerules, hopefully that'll do it. If there isn't a direct way to restrict the classes, is there a way I can have certain classes spawn at certain points? In this case I would just say, have all snipers spawn in a totally different area of the map where they will either be locked in a box or just die, example purposes of course. Thanks.