Frags filter (Counter)
A frag filter is often used in aim maps to count the hits and activate something (i.e. timer stop) if a limit is reached, but you also can force a player to collect items or do anything that has to do with counting.
Example:
-
Creating a door to imitate a target object that can be shot.
-
Create a func_door entity and set the key angle with the value 0 in the entity window (shortcut n) that travels the door horizontal into the direction 0 degree.
If you don't want the target to be activated more than one time use a high value for the wait key.
Apply a texture (i.e. base_button/shootme_glow).
-
Create a target_score entity with the key count and the value 1 that does increase the frags filter when activated.
-
Select the door and the score entity and connect them (Ctrl+k).
-
-
Creating a pickable item.
Create an item_health_mega entity.
-
Create a target_score entity with the key count and the value 1 that does increase the frags filter when activated.
-
Select the item and the score entity and connect them (Ctrl+k).
-
Creating a trigger to play a sound when the frags filter gets activated.
Create a small brush platform and apply a texture to it.
Create a trigger_multiple entity ontop of the platform and apply the common/trigger texture.
-
Create a target_fragsFilter entity with the key frags and the value 2.
-
Select the trigger and the frags filter entity and connect them (Ctrl+k).
-
Create a target_speaker entity and set the key noise and the value sound/world/growl1.wav.
-
Select the frags filter and the speaker entity and connect them (Ctrl+k).
This is the map file for the tutorial: