mtl_trigger_counter

mtl_trigger_counter icon

A multi-target variant of game_counter. Instead of triggering a single target when its counter reaches a certain value, it can trigger different targets at specific counter values.

This entity also has a 'clock mode', in which the counter is automatically incremented periodically. In this mode, triggering it will pause/resume the clock instead of incrementing the counter.

Related tutorials:

Properties

  • Name (targetname) -- The name of this entity.
  • Trigger mode (trigger_mode)
    • Increment when triggered (0) -- In this mode, triggering an mtl_trigger_counter will increment its counter by 1. The counter can also be decremented or set to a specific value by using a trigger_relay or game_counter_set, or by using the -targetname and set targetname value target patterns.
    • Keep incrementing until triggered again (Clock mode) (1) -- The counter value will automatically be incremented at a regular interval. Triggering the mtl_trigger_counter will pause or resume the incrementing.
  • Initial counter value (initial_value) -- The initial counter value. The default is 0.
  • Reset counter at (empty = no reset) (reset_counter_at) -- When the counter reaches this value, it is reset to the initial counter value. If this is empty, the counter will not be reset automatically.
  • Increment interval (Clock mode) (interval) -- When trigger mode is set to 'Clock mode', this is the interval at which the counter is incremented, in seconds.

Custom properties

Similar to multi_manager, targets are specified with custom properties, which can be added when SmartEdit mode is disabled. The property key must be an entity name, and the property value must be a number. The target entity will be triggered when the counter value reaches that number.

Flags

  • Start on (Clock mode) (1) -- By default, 'clock mode' is initially paused (off). By enabling this flag, the clock will immediately be active (on) when the level starts.

Notes

  • Unlike multi_manager, there is no limit to the number of targets.
  • This entity generates a number of game_counter and multi_manager entities, depending on the number of targets. One game_counter is generated for every distinct target counter number, and a multi_manager is generated for targets that have the same counter number.