Filters
A filter tests a certain condition or set of conditions to filter through entities, like a trigger_once using a filter_activator_name that only allows an entity with the name “cow” to pass it. Click here for more information on filters in Source.
In Mapbase, all filters have been given the following new I/O/KV:
Inputs
Tests the filter against the specified entity and fires OnPass or OnFail based on the result. (TestActivator only uses the activator)
KeyValues
When tested with
TestActivator or TestEntity, this causes the OnPass and OnFail outputs to use the entity that called the test as the caller instead of the filter itself.
New filters
Mapbase adds a few new filters so mappers could test more conditions:
| Classname | Summary |
|---|---|
| filter_activator_model | Filters an entity by its model's name. This entity already exists in all games starting with Left 4 Dead, but Mapbase adds the option to filter by skin and supports matchers. |
| filter_activator_context | Filters an entity by its response contexts. This entity already exists in all games starting with Left 4 Dead, but Mapbase allows for multiple contexts to be used at once and supports matchers. |
|
filter_activator_squad
|
Filters an NPC by its squad name, with the option to deny silent members. (enemy finders, vital allies in player_squad, etc.) |
|
filter_activator_hintgroup
|
Filters an NPC by its hint group, with the option to filter Hint Limit Nav. |
| filter_activator_keyfield | Filters an entity by its keyvalues, serving as an extension of logic_keyfield. |
|
filter_activator_relationship
|
Filters an entity by its relationship to a target, or vice versa. |
|
filter_activator_classify
|
Filters an entity by its Classify() class. (e.g. CLASS_PLAYER_ALLY) |
| filter_activator_criteria | Filters an entity by response criteria normally used in the response system. |
| filter_activator_involume | Filters an entity by whether it's inside of a target entity's volume. (e.g. a trigger) |
| filter_activator_surfacedata | Filters an entity by its surface data. (e.g. whether it's made of wood) |
Redirect filters
Redirect filters are a new “class” of filters that take a separate entity from the activator and pass it to another filter. For example, a trigger_once using a filter_redirect_weapon gets the activator’s weapon and passes it to a filter_activator_class, which checks if it’s a weapon_pistol.
| Classname | Summary |
|---|---|
| filter_redirect_weapon | Redirects the activator's weapon. When used as a damage filter, this gets the weapon used in the damage. |
| filter_redirect_owner | Redirects the activator's owner entity. |
| filter_redirect_inflictor | As a damage filter, this redirects the inflictor of the damage, e.g. the grenade in an explosion. (filters normally use the attacker) |
Damage manipulators
Damage manipulators are a family of filters designed to be used as damage filters, directly manipulating or operating with damage in some way. They don’t actually filter anything themselves, but they can use a “secondary filter” to act as an actual damage filter or to control their behavior.
4 of these entities exist in Mapbase:
| Classname | Summary |
|---|---|
| filter_damage_transfer | Redirects the activator's weapon. When used as a damage filter, this gets the weapon used in the damage. |
| filter_damage_mod | Modifies damage taken by entities using this filter. |
| filter_damage_logic | Fires outputs with damage parameters whenever an entity using this filter takes damage. |
| filter_blood_control | Controls whether blood can be emitted when an entity using this filter takes damage. (does not affect actual damage on its own) |
filter_script
filter_script is a special filter which allows filter functions to be controlled by VScript. See VScript for more information on VScript in Mapbase.









