Filtering for engineers

Discussion in 'Mapping Questions & Discussion' started by Amarnaman, Jan 22, 2008.

  1. Amarnaman

    Amarnaman L1: Registered

    Messages:
    1
    Positive Ratings:
    0
    Hi,

    I'm trying to see if its possible to have a trigger only fire if an engineer walks through it. I know I can put a filter into the trigger properties but in the filter (filter_activator_class), what do I put for the class name??? I've tried using GFCScrape and in the engineer_red.res file, there are possibilities (Engineer_red, classinfo_engineer, TF_Engineer) but none of them seem to work. Does, anybody know what the class/sub-class name of an engineer is or will this not currently work in TF2/Hammer???
     
  2. ryodoan

    ryodoan Resident Bum

    Messages:
    409
    Positive Ratings:
    59
    I dont know the answer, but what exactly are you trying to do to the poor engineers?
     
  3. Jive Turkey

    Jive Turkey L3: Member

    Messages:
    120
    Positive Ratings:
    32
    Nope. I've played around with this. I wanted to make map specific buildings that were created by whacking them with the Engi's wrench. No dice. From what I can see from some debugging in the console, all players have the same entity classname. Their "class" as in character class is just a field that is part of this entity, and it is a field which is inaccessible to any of the filter entities. They just see "player" regardless of which character they're actually playing as.

    This really sucks and I wish Valve would include some way to determine a player's character class as it would open up a lot of new ideas on map specific objectives.
     
  4. werny

    werny L1: Registered

    Messages:
    11
    Positive Ratings:
    0
    I was wondering is there anyway to take out metal from an engy? so I could create something and it would take 30 metal?, or is that not possible
     
  5. felipebp

    felipebp Guest

    Positive Ratings:
    0
    I am also trying to filter engineer/demoman but without success yet.
     
  6. Milktoast

    Milktoast L1: Registered

    Messages:
    26
    Positive Ratings:
    0
    I ran into the same problem. Everyone is "player." However, from the debugging console, you can see their "playerclass" (which does show what class they are) and even an attribute that shows what weapon they're holding... but there's no way to get at that information from the filter.
     
  7. spaceweasels

    aa spaceweasels

    Messages:
    219
    Positive Ratings:
    336
    This is the root of the problem. The filter_activator_class filters specific entity classes, not player classes. When a player spawns, no matter what type of TF2 character they chose, they all come from a info_player_teamspawn entity, all players use (and are) the same entity.

    If you were making a HL2 map, and you wanted a small room which zombies can't enter, you would filter out npc_zombie since that is the entity that creates zombies. You can't filter specific zombie models however.

    In brief, the filter_activator_class examines too broadly for your requirements. Hope that helps.
     
  8. Jive Turkey

    Jive Turkey L3: Member

    Messages:
    120
    Positive Ratings:
    32
    I really think we should formally petition Valve for this sort of filter entity. It would be dirt simple to implement but it would open a lot of doors for custom map objectives for specific classes.

    This is from a post I made on another forum:
    I'd really like to see this sort of capability.
     
  9. felipebp

    felipebp Guest

    Positive Ratings:
    0
    I also agree.
    Should do a petition to create a valve body of the filter damage and filter class for tf2.
     
  10. MacNetron

    MacNetron L5: Dapper Member

    Messages:
    203
    Positive Ratings:
    47
    Isn't there anyway to add "real code" to a map? Like some sort of plugin?
    I can imagine that hammer can't figure out player classes, but can't we just add it? (or am I now talking 'modding'?)
     
  11. ryodoan

    ryodoan Resident Bum

    Messages:
    409
    Positive Ratings:
    59
    I doubt it, because it would open up the door for some serious exploits.
     
  12. spaceweasels

    aa spaceweasels

    Messages:
    219
    Positive Ratings:
    336
    Bingo! Modding. You'd actually have to create 9 new enitities. When you create a new map, instead of using info_player_teamspawn you'd use info_player_medic, info_player_soldier, info_player_spy, info_player_pyro and all the rest. This way, the different player classes come from different entity classes.
     
  13. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,745
    oooh thats a nice idea, then you could have different classes spawn in different areas, add some interesting game types
     
  14. MacNetron

    MacNetron L5: Dapper Member

    Messages:
    203
    Positive Ratings:
    47
    Sounds interesting indeed, but can we add that easily in a map. So that it still can be in a map-rotation of a server?
    Or do we "break" TF2 by that to have the need start a modded TF2? This last case would be unfortunate.
     
  15. spaceweasels

    aa spaceweasels

    Messages:
    219
    Positive Ratings:
    336
    If someone were to implement what I had said (different entities for different player classes), then it wouldn't be TF2 anymore, it would be a mod. You could make it compatible with 'official' TF2 maps, but the server and clients would still have to run the mod instead of TF2.
     
  16. MacNetron

    MacNetron L5: Dapper Member

    Messages:
    203
    Positive Ratings:
    47
    Too bad...
    Thanks for the explanation though, as I learned something today :thumbup1: