PDA

View Full Version : A guide to filters



Bob Loblaw
11 Aug 2009, 12:12pm
The three main filters I use are filter_activator_name, filter_activator_team, and filter_damage_type.

Filters aren`t used too often in genuine cs:s maps due to the fact that nothing is special per team, but for minigame maps and zombie escape maps you will need to know the basics of filters.

Lets get filter_damage_type out of the way first. I see lots of people wondering how to disable fall damage and this is how you do it.

Create a filter_damage_type. Let`s call it Bunnyrabbitsgalore. Set it to Disallow and set the damage type that it is disallowing to fall. This filter will now remove fall damage to anything it is filtering. Unfortunately it`s not filtering anything right now so lets make a trigger_multiple.

Create this trigger_multiple somewhere where the player will DEFINITELY walk through. Creating it at spawn where they spawn inside of it is probably best, but if you don`t want it enabled off the start then create it somewhere else that they must walk through. We don`t need a name for the trigger_multiple because it is too pro for names. Make sure it is start ENABLED and for outputs add this:

OnStartTouch
!activator (whatever activates the trigger, since we have the "clients" flag checked and nothing else it means that whatever client (player) touches this they will be the activator and this will activate for them)
SetDamageFilter
Bunnyrabbitsgalore (The name of our damage filter)

Done. Now whatever player touches the trigger_multiple will recieve the filter that disallows fall damage. You can use filter_damage_types on func_breakables as well to decide if bullets hurt it etc. The only thing I really use this for is disallowing fall damage though.

Filter_activator_team is probably the most used one. Lets take the above situation but let`s say we only want the terrorist team to recieve no fall damage. We must create a filter_activator_team. We will name it 6378515callme. Set it to Allow (which means ONLY what matches the criteria will pass), and terrorist. Disallow Counter-Terrorist will do the exact same thing, but it is just easier to work with allow, because, why not.

Now go into the trigger_multiple`s properties that we created to set the activators damage filter. Where it says Filter put 6378515callme.

Done. The trigger_multiple now has a filter that only recognizes terrorists. Ct`s will pass through it and nothing will happen for them, t`s will pass through it and get the damage filter that disallows fall damage.

This can be done with most triggers, like trigger_hurts, trigger_pushes, trigger_gravity etc etc. If you want something to affect only one team, filter_activator_team is how it is done.

Filter_activator_name isn`t used as much, but it is used in pro-star maps like ze_LOTR_Mount_Doom. I know you are wondering "THE FU**! How does his map know if the ring fell into the mountain. And how the hell does his map know if the person with the ring went into the mountain with the ring or dropped it in instead."

The answer is simple nipples. He used filter_activator_name`s.

He creates the gun that has the ringsprite parented to it and calls the gun GoodApolloI`mBurningStar4. Then at the mountain he creates probably three trigger_multiples.

But first lets make the filter_activator_name`s. Create one and name it filteractivatorname. Filter Mode again will be set to Allow, and for Filter name put GoodApolloI`mBurningStar4.

Go into trigger_multiple(1). Set it`s filter to filteractivatorname. Now it will only recognize things with the name GoodApolloI`mBurningStar4. You can now set the outputs on the trigger_multiple to do whatever you want when the gun is tossed in.

For Outputs have:
OnStartTouch
BabiesAboard
Kill

And make sure Trigger(1) is above triggers(2, and 3).

QUICKEXPLANATION:Most things aren`t registered when parented to a weapon that is picked up by a player, so he used a prop to be registered. Let`s call his misc prop proptometry. The trigger must be turned on while the prop is inside it to register it if it is attached to a player.

We must create another filter_activator_name. Call it BobLoblawProName Set it to Allow And the Filter Name have proptometry.

Go into trigger_multiple(2) and call it BabiesAboard. Set the Start Disabled to Yes, put it`s filter to BobLoblawProName and for outputs have whatever you want to happen when the ring bearer actually jumps in rather than drops the gun in.

Go into trigger_multiple(3). Have it Start Enabled and make it smaller than trigger(2). Outputs:

OnStartTouch
BabiesAboard
Enable

and

OnStartTouch
BabiesAboard
Disable
Delay:.1

Done :)
If the ring bearer drops the gun in, it will be registered in the first trigger and the second one will be killed. So the first trigger will fire it`s output that happens when the gun is dropped in and the second one will be dead stopping the gun from being registered twice as being tossed in and going in with the ringbearer.
If the ring bearer goes in with the gun, then the first one wont register the gun because it is still equipped to the player. So it will drop down into the second and third trigger. The player will hit trigger (3) which will turn on (2). Now the prop parented to the gun will be inside 2 when it is turned on and (2) will recognize it firing it`s output that corresponds with "The ring bearer being slaughtered with honour".

Sorry for no pictures I just see no point in adding lets say a picture of a trigger with an output I`ve already told you how to do :).

Goodluck using filters. If confusing just ask where and I will clarify. Sorry I didn`t go in depth with the prop thing. I explained it to someone before and it`s quite a bit of explaining that I didn`t want in my thread. So if you do really want to know exactly how to do the prop thing just ask and I guess I will post it :P

awesomebillfromdawsonvile
13 Aug 2009, 01:16pm
http://www.steamgamers.com/forum/showthread.php?t=22391

thats where the rest of the info on mdls are. thanks again for a very useful post.