Cleanup is going to take awhile, so the site is back up but editing has been disabled.

Filters

From HalfLife 2 Knowledge Base

Jump to: navigation, search

Contents


by: Exitus



What is a filter? Well, it's like a sifter, it sifts out things you don't want to go through it and lets the things you want to let through it past. What is it useful for? Lots of things! Making those blue combine wal things that only some things can go through and things like that. In this tutorial, I'll give you a quick overview of each filter_* class and examples of when you would use it.


filter_activator_class

When you need to have something filtered by classname, such as npc_combine_s or npc_citizen, or anything with a classname, you need to use this class.


Possible Uses:

- Filter for Combine Energy Wall


filter_activator_name

What if you want to have filters that filter based on the Name of an entity? In that case, you would use this. Lets say you want to block a character that is of a class, say, an npc_citizen with a name of "citizen", but you don't want to block the entire class, you would use this.


Possible Uses:

- Filter for the precincts near the beginning of the game

- Filter for only specific items/props


filter_activator_team

A filter that is useful for team based multiplayer. You can use it for anything that you want only one team or the other to be able to use. Then you use this.


Possible Uses:

- Doors that only open to specific teams

- Entities only able to be used by a specific team


filter_damage_type

One special kind of filter is the damage filter. This would be used with maybe a strider or something, and it filters the kinds of damage that can go through. Say you want a citizen to be impervious to radioactive materials, since it is a hazmat (normally you would code this in, but thats beyond the scope of this tutorial), then you would use this.


Possible Uses:

- Damage Filter


filter_multi

If you need a filter that can act as any other filter, then this is what you want to use. Say you want to block the entire npc_combine_s class, but you want one to be able to go through with a specific name. You need to first make those filters, and then, make a filter_multi. Then, you should choose a Logic type, which is AND or OR. You use AND if you want the entity to have to pass ALL of the filters, and you use OR when you want the entity to only have to pass one kind of filter.


Possible Uses:

- Disallow all members from npc_citizen except a named one

- Disallow all from team x except class engineer


Conclusion

Also, be sure to note that if you have a filter where you want it to be where ONLY that class can pass the filter, you can switch the "Filter Mode".


Have fun trying these out =)

External Links

Edit Half-Life: Filter Entities

Personal tools