Confused with filter_multi

Discussion in 'Mapping Questions & Discussion' started by 【EmNudge】, Jun 23, 2016.

  1. 【EmNudge】

    【EmNudge】 L4: Comfortable Member

    Messages:
    183
    Positive Ratings:
    37
    I really want to combine filters, but the entity is confusing me a bit. I just want to clarify a few things.

    1. if negate is set to "yes", this means that if my combined filters detects blue spies when they hit a button, blue spies will not allowed to hit that button. (as opposed to no meaning that only blue spies can hit that button)negate equalling yes is the same as it being set to disallow.

    2. should the filters that the filter_multi holds be set to disallow or allow? Say I wanted to not allow blue spies, should I set the filter_activator_tfteam and the filter_activator_class to allow and the filter_multi to negate=yes or do I set them both to disallow, still setting negate to yes
    still not exactly sure if the "allow" and "disallow" being set on the filters matters once in the filter multi, but it might work as follows: if it is set to allow then whatever is detecting will output true and if disallow then everything else is true. The filter_multi says whether to allow or disallow what is true.

    3. can I combine filter_multi's? I'd think so, but say I wanted to only allow either blue spies or red heavies. Could I have 2 filter_multi's set up, one to allow red heavies and one to allow blue spies, and then a third filter_mutli with OR and negate set to no?

    the answer is yes. Filter_multi's can be combines in other filter_multi's

    4. This question isn't exactly on filter_multi, but on filter_activator-class. What do I put in for the classname? A number, or the classname actual string, as it seems to suggest. i.e. demoman = demoman OR demoman = 7
    the number exists on the wiki and I was using it wrong. Filter_tf_class is the one and does not exist automatically in hammer. it must be added via the FGD. It also has a dropdown menu.


    Questions answered by frosty and some testing.
     
    Last edited: Jun 23, 2016
  2. Frosty Scales

    aa Frosty Scales

    Messages:
    85
    Positive Ratings:
    34
    filter_activator_class != filter_tf_class

    The former filters by the entity's actual classname, e.g. item_healthkit, item_ammopack,
    The latter filters by TF2 class, but needs to be added manually since it isn't available in hammer.
     
    • Thanks Thanks x 1
  3. 【EmNudge】

    【EmNudge】 L4: Comfortable Member

    Messages:
    183
    Positive Ratings:
    37
    you're right. I actually made a thread while back and got a response from @worMatty saying:
    although filter_tf_class isn't in my hammer (even though wormatty said tf2 got it added by GunMettle).
    How would I go about adding it?
    there even is a wiki page at https://developer.valvesoftware.com/wiki/Filter_tf_class for it. Weird why it isn't in my hammer.
     
  4. Frosty Scales

    aa Frosty Scales

    Messages:
    85
    Positive Ratings:
    34
    Funny enough, I originally added the FGD code at the bottom of that wiki page a while back. Go ahead and copy that code, and paste it at the end of Team Fortress 2/bin/tf-abs.fgd (Assuming you have the MRP installed)

    After doing that, restart hammer and the entity should be present.

    As for why it isn't already there, Valve doesn't always update the documentation (FGD) for the entities, so they're in the game, but hammer doesn't know about them.