Filter multi

From Valve Developer Community
Revision as of 08:42, 5 September 2016 by Jellydonut78 (talk | contribs)
Jump to navigation Jump to search

Template:Base point It is a filter that tests the activator against multiple filters. This allows you to build more complex filters, such as "Allow anyone on Team 1 who is also class engineer", or "Allow everyone except classes npc_zombie and npc_headcrab".


It is possible to add a filter_multi to the test filters of a filter_multi to create very large filters that would otherwise be impossible.

Keyvalues

Logic Type ([todo internal name (i)]) <choices>
Boolean logic applied when testing the filters.
  • 0 : AND (all filters must pass)
  • 1 : OR (any filter must pass)
Negate Outcome ([todo internal name (i)]) <boolean>
Whether to negate the result of the subfilters, after combining them using the Logic Type chosen.
Negating the outcome using the AND logic type means that any subfilter must fail for this filter to pass.
Negating the outcome using the OR logic type means that all subfilters must fail for this filter to pass.
Filter 1 ([todo internal name (i)]) to Filter 5 <filter>
Activator filter to test.
Filter 6 ([todo internal name (i)]) to Filter 10 <filter> (in all games since Left 4 Dead)
Activator filter to test.

BaseFilter:

Filter mode (Negated) <boolean>
Inverts the filter, making the specified criteria fail and all others pass.

Inputs

BaseFilter:

TestActivator <variantRedirectInput/variant>
Tests the entity that called the input (the !activator) against the filter, and fires either the OnPass or OnFail output. (the parameter it takes is unused)
Icon-Bug.pngBug:Calling this input will cause the server to crash if the !activator entity no longer exists. Do not use this input to test any entities which may be asynchronously deleted, such as players or projectiles, or in an i/o chain which might be initiated by entity deletion, such as the OnEndTouch output of a trigger.

Outputs

BaseFilter:

OnPass
OnFail
!activator = activator of TestActivator input
!caller = this entity
One of these will fire when TestActivator input is sent, depending on if the activator is allowed by the filter or not.