4.5. mtl_trigger_random

An entity that randomly selects one of its targets and triggers it. It also has a continuous mode that triggers random targets at a randomized interval.

Properties

  • Name (targetname) -- The name of this entity.
  • Trigger mode (trigger_mode)
    • Fire one target (0) -- The mtl_trigger_random will trigger a single target each time it is triggered.
    • Keep firing targets (until toggled) (1) -- The mtl_trigger_random will start triggering targets when triggered, and stop triggering targets when triggered again. It can also be enabled or disabled by sending it an 'on' or 'off' signal with a trigger_relay, or by using the +targetname and -targetname target patterns.
  • Min. trigger interval (Toggle mode) (min_interval) -- The minimum time before another target will be triggered. Only applies to toggle mode. The default is 1 second.
  • Max. trigger interval (Toggle mode) (max_interval) -- The maximum time before another target will be triggered. Only applies to toggle mode. The default is 1 second.

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, the property value is not used.

Flags

  • Start on (1) -- If enabled, the mtl_trigger_random will start triggering targets when the level starts, instead of waiting until it is triggered. Only applies to toggle mode.

Notes

  • This entity generates a single env_beam and a number of func_button entities. The buttons are invisible and won't block the player, and the beam deals a minimum amount of damage, but the buttons do make some noise when hit, so it's still a good idea to place this entity somewhere out of reach.
  • The amount of space required for the buttons depends on the number of targets. 48x48x2 is enough for up to 100 targets.