Talk:Filter Applications

From Valve Developer Community
Jump to: navigation, search

I'd quite like to remove all entities of a certain class (i.e. npc_combine_s) from an area of my map. There's potentially quite a few of them, all with different targetnames - can a filter be used for this? Or will I have to create a giant logic_relay with a Kill output for each targetname? Thanks in advance for any ideas! --Cargo Cult 08:55, 16 Jul 2005 (PDT)

I think you can just use the classname of the entities in the Kill output of an entity to do this. --IanL 11:35, 17 Jul 2005 (PDT)
Only if you want to kill off every npc_combine_s in the general level. If you just want to kill them all off within a particular area, and they all have one shared targetname, you can work it with filtering by targetname or using outputs with that targetname. If they all have to have different names, then you'd be best off manually killing each. --RabidMonkey 12:13, 17 Jul 2005 (PDT)
Ah, I missed the part where he said "from an area of my map". Yeah, you're right, using the classname in an output would kill all of the NPCs with that class in the level. Another way to do this is to cover the area with a large trigger_hurt. Then add a filter_activator_class with the class of npc_combine_s. Start the trigger_hurt disabled. When the trigger_hurt is activated, any combine inside the trigger will take the damage. This will actually kill them, unlike the Kill input, which makes them instantly disappear. A SetHealth 0 input should do the same thing. --IanL 12:30, 17 Jul 2005 (PDT)

I hadn't realised there were replies here (d'oh!) so I went for the giant logic_relay in the end, but the suggestions here sound very useful for future stuff. Thanks! :-] --Cargo Cult 04:05, 20 Jul 2005 (PDT)

Shame i didn't see this earlier but you could use a filter. Use a trigger_multiple filtered for npc_combie_s only. Then you have the trigger_multiple with the condition OnTrigger !activator Kill. Seeing as only npc_combie_s will trigger it they'll be the only !activators and thus the only ones removed by the trigger. --Angry Beaver 10:52, 24 Jul 2006 (PDT)