filter_enemy

From Valve Developer Community
Revision as of 22:21, 24 March 2015 by Sauerfiend (talk | contribs)

Jump to: navigation, search
Filter class.png
filter_enemy is a point entity available in all Source games. It is a filter intended to filter a potential enemy entity by a set of criteria.

It can also be used as a proximity filter for any type of entity.

Keyvalues

Name/Classname <string>
The classname or entity name to filter by. If the filter mode is Allow, only entities whose class name matches the given string will have further criteria tested. If the filter mode is Disallow, all entities EXCEPT those whose class name matches the given string will have further criteria tested. If no string is given, all entities will have further criteria tested. Entities for which further criteria are not tested will always pass the filter.
Radius <float>
Radius by which to test the proximity of the enemy. If the filter mode is Allow, only entities whose distance is equal to or closer than the radius will pass the filter. If the filter mode is Disallow, all entities outside the radius will pass the filter.
Outer Radius <float>
Enemies outside this radius are considered invalid if Allow is set and valid if Disallow is set.
Max Squadmates Per Enemy <integer>
Maximum number of squadmates allowed to target any given entity.

BaseFilter:

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

Flags

  • 1 : Do not lose target if already aquired but filter failed.

Inputs

BaseFilter:

TestActivator
Tests the entity that called the input (the !activator) against the filter, and fires either the OnPass or OnFail output.
Bug: Calling this input from the OnEndTouch output of a trigger will crash the server if a player disconnects within it!

Outputs

BaseFilter:

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