[Tutorial] Filtering a trigger

Avatar
Mapster
396 Posts
Posted Nov 18, 2007
For years i have been unaware and confused how people manage to make it so that 1 trigger can only be triggered by certain objects such as only a storage cube and a npc_zombie.

Only recently i have discovered how to make this function which is by using a point-entity called filter_activator_name.

On all brush-entities that have the option of "Filter Name" in the list, this is what only can trigger the entity including the flags in the brush-entity.

The way to make a filtered trigger is by creating a point-entity and make it a filter_activator_name and change the Filter_Name to the name of the entities you wish to activate the trigger.

If you want multiple entities with different names to activate the trigger then put in an asterisk ( * ) to where you want the rest of the entities to pass through; such as if the Filter_Name was Prop, then anything with the name Prop* at the beginning of it's name will pass through.

Below is a small graph of what only can pass the filter if the Entities beginning of the name is Prop.

Advertisement
Registered users don't see ads! Register now!
Avatar
Hober
1,180 Posts
Posted Nov 19, 2007
Replied 3 hours later
What about prop? Would that effect "NPC_prop_funk"?
Avatar
Mapster
396 Posts
Posted Nov 19, 2007
Replied 3 hours later
Any entity that has their name beginning with prop will will pass the filter.

EDIT:
Not sure if the prop will work, never tried it.

Avatar
Korjagun
122 Posts
Posted Nov 19, 2007
Replied 2 minutes later
I'm guessing * is a simple wildcard, so it ought to work (though I haven't tried it).
Avatar
msleeper
4,095 Posts
Member
Posted Nov 19, 2007
Replied 1 minutes later
prop would work, the filtering system works just like any other wildcard selection. You could also do something like "room_lock_0?_sprite" and use the question mark as a single character wildcard.
Avatar
Mapster
396 Posts
Posted Nov 19, 2007
Replied 39 minutes later
I didn't know that symbol.

We need a topic for all these wild card and console commands sch as !self and so on... i would make it but i'm off to bed now so i'll make it tomorrow if no one else has

Avatar
linus
12 Posts
Posted Nov 19, 2007
Replied 4 hours later
what is the activator name if the player activates a trigger?
Avatar
Korjagun
122 Posts
Posted Nov 19, 2007
Replied 3 minutes later
What? Can you rephrase the question, please?
Avatar
espen180
307 Posts
Posted Nov 19, 2007
Replied 45 minutes later
Why does this need a tutorial? All you will ever need to know about this can be found over at developer.valvesoftware.com
Avatar
youme
937 Posts
Posted Nov 19, 2007
Replied 1 hour later

linus wrote:
what is the activator name if the player activates a trigger?

!player and anything that activates it is !activator

Avatar
espen180
307 Posts
Posted Nov 19, 2007
Replied 7 minutes later
By the way, if for example a trigger is going to be triggered by any physics stuff, it's better to use a filter_activator_class instead, so you don't have to name all your physics stuff.
Avatar
msleeper
4,095 Posts
Member
Posted Nov 19, 2007
Replied 41 minutes later

espen180 wrote:
Why does this need a tutorial? All you will ever need to know about this can be found over at developer.valvesoftware.com

bscly

Maybe we should make a "Useful Mapping Links" sticky or something.

Avatar
linus
12 Posts
Posted Nov 19, 2007
Replied 1 hour later

youme wrote:
!player and anything that activates it is !activator

thanks mate.

Advertisement
Registered users don't see ads! Register now!
Avatar
Yekyaa
59 Posts
Posted Nov 19, 2007
Replied 2 hours later

Hober wrote:
What about prop? Would that effect "NPC_prop_funk"?

http://developer.valvesoftware.com/wiki/Targetname

Quote:
Notes

There are several extended features to name searches that are useful in a variety of situations. The most common use is to target an entity with an unknown name that is somehow involved in the current I/O chain. The extended features are:

* Wildcards

Name searching supports trailing * wildcards only. So searching for area1* will match any targetnames that start with area1 (i.e. area1_portal and area1_door, but not area2_door).

This was pulled by looking for filter_activator_name and clicking on targetname.

So, no, starting * will not work unfortunately, but this is according to Valve's information, so feel free to test to verify, I'm not running Hammer atm ^^