class restrictions

Discussion in 'Mapping Questions & Discussion' started by Axl, Jul 21, 2017.

  1. Axl

    Axl L1: Registered

    Messages:
    19
    Positive Ratings:
    1
    It's been a couple of years since I've done any map editing. Just wondering if there is a way to restrict classes without a plug-in or using a point_servercommand?

    I guess tournament mode now allows for class restrictions. Is there a way to bake that in to the map?
     
  2. Idolon

    aa Idolon the worst admin

    Messages:
    1,421
    Positive Ratings:
    4,154
    I don't think there's any totally clean way to do this. However, filter_tf_class can be used to filter for a single class, which then can be used with filter_multi to combine into a whitelist/blacklist of your choosing. You'll also need a method of actually enforcing this list, which I've done before with a trigger_hurt over the spawnroom. You could also try teleporting undesired classes into another inescapable room, which is perhaps a less cruel solution.
     
    • Agree Agree x 1
  3. [Rx.] Christian Troy

    [Rx.] Christian Troy L4: Comfortable Member

    Messages:
    154
    Positive Ratings:
    42
    When I get home in the morning I can take a look at how a co-author did this on one of our maps (I work nights). Right now I can't remember if they were able to do this with point_clientcommand or the ugly one.
     
  4. henke37

    aa henke37

    Messages:
    1,834
    Positive Ratings:
    420
    I can only hope that you know it's a bad idea to do this in maps that resemble normal play.
     
    • Funny Funny x 1
  5. [Rx.] Christian Troy

    [Rx.] Christian Troy L4: Comfortable Member

    Messages:
    154
    Positive Ratings:
    42
    I have taken a look at the map we did for this and the co-author did set it up with point_clientcommand and not point_servercommand. Is this still doable for you? Right now the point_clientcommand, filter_activator_class, and the triggers are set to force people to the sniper class but it can be modified any which way you would like. It was set up for sniper only tournaments on a map designed primarily for the sniper class but, you can edit it to your liking.

    Feel free to let me know and I can make ya a little .vmf prefab to post for ya. ;)
     
    Last edited: Jul 22, 2017