Class differentiation

discrider

L1: Registered
Dec 5, 2009
2
0
Hi all.

I've only just joined the forums and started my hand at mapping, so bear with me if I get something terribly wrong here.

I would really like to find a way for my map to differentiate between players of different classes without resorting to modding or sv_cheats.

Anyhow, my question is whether the player entity, whatever that is called, can become the parent of other entities, which can then be filtered by the filter_activator_class entity.

If this is the case, then I could force the players into a certain class with a certain corresponding entity, and then have the map react to the entity instead of trying to detect the class.

And if this is possible, would the child entities persist on the player entity after death?

Thanks
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
filter_activator_class has nothing to do with the classes of TF2. Unfortunately there is no method I'm aware of that allows you to filter out certain classes.
 

Bermuda Cake

L9: Fashionable Member
Feb 20, 2009
679
480
if you want to only let spies through, a sentry to shoot members of one team would work, forcing them to disguise before they reach it.
Soldiers and demos: rocket jump
Scout: long jump
Unfortunately most of these can be bypassed by people who are determined.

Some servers run class limits, though
 

Pseudo

L6: Sharp Member
Jan 26, 2008
319
150
I would really like to find a way for my map to differentiate between players of different classes without resorting to modding or sv_cheats.
sv_cheats would not help.

Anyhow, my question is whether the player entity, whatever that is called, can become the parent of other entities,
Yes. You can use SetParent with a trigger's !activator.

And if this is possible, would the child entities persist on the player entity after death?
Yes. If that is not what you want there is a way to change that though.

which can then be filtered by the filter_activator_class entity.
No. Most entities will not activate a trigger. If you want to "mark" a player, a better way would be to target !activator with AddOutput targetname whatevername and then use a filter_activator_name.

If this is the case, then I could force the players into a certain class with a certain corresponding entity, and then have the map react to the entity instead of trying to detect the class.
Are you referring to using a clientcommand with join_class? I have heard conflicting reports on whether this works when the map is on a dedicated server.
 

gamemaster1996

L13: Stunning Member
Sep 30, 2009
1,064
134
Lol why does this always come up :D
 

StoneFrog

L6: Sharp Member
May 28, 2008
395
81
This was a TFC map in which players were limited to playing as Medics and Heavies. Whichever team captured the flag 10 times first won - oh, and there was no respawning and gameplay was divided into rounds. Kind of like Counter-Strike.

You have no idea how fun it was to attempt things like 10 Medics forming a wall around their flag while spamming the medkit or watching Heavies bunnyhop away with the flag.

All to this maddeningly awesome tune.

[ame="http://www.youtube.com/watch?v=hjKOiRBPUm4"]YouTube- hwguyz2[/ame]

TF2 needs class limitations so we can pull off stuff like this again! :D