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:
  1. Creating a door to imitate a target object that can be shot.

    1. 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.

      (Image entitywindow1)

      If you don't want the target to be activated more than one time use a high value for the wait key.

    2. Apply a texture (i.e. base_button/shootme_glow).

    3. Create a target_score entity with the key count and the value 1 that does increase the frags filter when activated.

      (Image entitywindow2)
    4. Select the door and the score entity and connect them (Ctrl+k).

      (Image score1a) (Image score1b)
  2. Creating a pickable item.

    1. Create an item_health_mega entity.

    2. Create a target_score entity with the key count and the value 1 that does increase the frags filter when activated.

      (Image entitywindow2)
    3. Select the item and the score entity and connect them (Ctrl+k).

      (Image score2a) (Image score2b)
  3. Creating a trigger to play a sound when the frags filter gets activated.

    1. Create a small brush platform and apply a texture to it.

    2. Create a trigger_multiple entity ontop of the platform and apply the common/trigger texture.

    3. Create a target_fragsFilter entity with the key frags and the value 2.

      (Image entitywindow3)
    4. Select the trigger and the frags filter entity and connect them (Ctrl+k).

      (Image fragsfilter1a) (Image fragsfilter1b)
    5. Create a target_speaker entity and set the key noise and the value sound/world/growl1.wav.

      (Image entitywindow4)
    6. Select the frags filter and the speaker entity and connect them (Ctrl+k).

This is the map file for the tutorial:

Written by Pan-(G)