Filter based on player class

Chro

L1: Registered
Mar 26, 2008
20
3
Is there a way to stop certain classes based on what class they are, and i don't mean obstacles. Just a door that only spies can go through, any other class will get stopped. I know theres the best in class map but I don't think they had something like this.
 

Half-Life_Maniac

L3: Member
Nov 30, 2007
122
89
Currently, there is no such thing. I know it's a much requested feature at the moment, and really is something that aught to have been there from the start.

As far as I'm aware, no one has thought of a workaround yet.
 

Pseudo

L6: Sharp Member
Jan 26, 2008
319
150
You could use a trigger_multiple that OnTouch sends a point_clientcommand the Command join_class spy and put a func_respawnroom around the trigger. When a player that is not a Spy touches the trigger, they will be sent back to a spawnpoint and respawn as a Spy. When a Spy touches the trigger, nothing will happen.
 

dirtyminuth

L5: Dapper Member
Nov 5, 2007
221
15
Exploiting the fact that the client command won't do anything if you're of the specified class is quite clever. I'm going to bake a cake for you.



Disclaimer: dirtyminuth reserves right to consume cake upon completion of baking.
 

xgloryx

L1: Registered
Feb 26, 2008
21
2
You might want to test that more thoroughly (on a server with other players) before you get too excited. I have a friend who was trying to do a map that would only allow heavies to spawn but he not was able to do so because that method wouldn't work properly. It worked fine when he compiled the map on his machine and ran it, but once the map got to a server it failed. I have also been in contact with the creator of BIC and he had the exact same results.

My friend actually did end up making the map restrict people to only soldier, by hitting anyone who spawned with something like 320 damage points. As it turns out, the soldier has some sort of "armor" that allows it take more damage than even the heavy.
 

vincister

L1: Registered
Apr 6, 2008
2
0
Hey guys, sorry about posting in old topic, but the question is the same.

I need a zone that only scouts can go trough, any other class can roam around the spawn, but cannot go to this zone, or they get killed and respawns as scouts.

I have trigger_multiple that OnTouching targets point_clientcommand entity. "via this input" field I set to "command" and "with a parameter override of" I set to "join_class scout".
So this should set players class to scout if they touches the trigger, right? And respawn him instantly if he has not disabled "kill after class selection".
Or is there something to do with filters (filter_activator_name)? How to filter clients depending on their class, with this entity?
 

xgloryx

L1: Registered
Feb 26, 2008
21
2
See my post above. This apparently cannot be done because there are only a few commands that can be sent to clients during internet games and join_class is not one of them. I used to have a references for this but can't recall where I read it.
 

vincister

L1: Registered
Apr 6, 2008
2
0
Ah, the thing - valve preventing servers from executing commands on players :(
Too bad, also bad for screen taking anticheat system.
 

kimangroo

L3: Member
Mar 15, 2008
111
6
ahh damm it, why do they always have to make things so complicated!!

anyone have a list of which commands servers can execute on players and which ones they can't? I'm making quite a gimmicky map which relies on a fair few client commands and will be gutted if they don't work after all.
 

Trypto

L1: Registered
Apr 1, 2008
35
22
Too bad the game doesn't tell which class a player is in some way that a filter_activator_class could pick it out... unless?
 

Jive Turkey

L3: Member
Jan 22, 2008
120
32
Unless Valve moves its ass and implements a tiny but powerful feature which would allow mappers to fully utilize the thing that makes team fortress 2 so interesting, the varied traits and personalities of the player classes! It still bugs me that the game logic is so limiting in this respect. I think Valve doesn't want people making maps with goals other than cp, ctf (and their new payload) and confusing casual players; but I think most players now would really dig a broadening of the map goals set at this point.
 

rt3407v06p909

L1: Registered
Apr 16, 2008
30
17
It's even worse when you consider I made maps with vastly more complicated/cool/nifty logic/puzzles and features with Quake 1 and the original TeamFortress mod back in 1997.

That's 11 years ago, and... Today with Orange Box TF2 I can't uniquely identify players, give or take away keys per player, or filter on Player class. Hm. Maybe change really does create the illusion of progress, Valve? Note: All of these things were possible in the original Quake 1 TF Mod.

I mean, I appreciate the art and style of Orange Box TF2. I really do. It's fun to play, and keeps things light and amusing. But sheesh, it's so painful to make interesting maps being hamstrung, compared to the original.

And before all of you jump all over me and say "Learn to Code your own Mod, noob" let me know how that's worked out for YOU, personally. Yeah, that's right, it's not so easy is it? =) How many mods are out there now, after almost 6 months? Three? Less than six? Meh.

There's a reason why people want a map editor with powerful entities that's feature rich. So they don't HAVE to make their own mod!

Dammit, 11 years! Eleven! Grr.