Confused with filter_multi

  • If you're asking a question make sure to set the thread type to be a question!

EmNudge

L4: Comfortable Member
Sep 23, 2015
184
60
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:

Frosty Scales

L2: Junior Member
Mar 22, 2015
93
30
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.
 

EmNudge

L4: Comfortable Member
Sep 23, 2015
184
60
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.
you're right. I actually made a thread while back and got a response from @worMatty saying:
There was a new filter entity that came about in the game along with Gun Mettle, I think. It seems to be for TF2 class filtering. It's called filter_tf_class. It has one property named tfclass and its value should be a single number. That number is representative of one of the TF2 classes, like so:
  1. Scout
  2. Sniper
  3. Soldier
  4. Demoman
  5. Medic
  6. Heavy
  7. Pyro
  8. Spy
  9. Engineer
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.
 

Frosty Scales

L2: Junior Member
Mar 22, 2015
93
30
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.
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.