Skip to content
Dmitry Novikov edited this page May 22, 2018 · 5 revisions

Trigger_random

Point entity
















































Description

    Trigger which will pick one of its targets randomly and fire it when triggered (may use random time delay). Can be set to trigger only target that haven't been triggered before by this trigger_random (when multiple triggering).

Properties

    Name - (targetname) (String)
      The targetname that other entities refer to this entity by.

    Target Count - (target_count) (Integer)
      Amount of random targets you have specified. E.g., specify 'Target 1' and 'Target 2' and set this to '2'. The other three target fields will be ignored!

    Target # - (target#) (String)
      Specify up to 16 targets of which one will be picked randomly whenever the trigger_random entity is triggered.

    Minimum delay- (min_delay) (Float)
      Minimum delay, in seconds, till a random target will be fired. Set it to 0 to disable minimum value.

    Maximum delay- (max_delay) (Float)
      Maximum delay, in seconds, till a random target will be fired. Set it to 0 to disable maximum value.

Flags

  • 1: "Start On (Timed only)": Makes trigger_random (with 'Timed' flag) enabled at map start, so it will start it's timer and trigger random target on game start. If 'Trigger Once' flag isn't selected, it will continue until deactivated by trigger.
  • 2: "Trigger Once (Timed only)": When using random delays ('Timed' flag), this tells to trigger a random target once, instead of continuously triggering random targets until deactivation (in that case, disable timer by triggering this entity again).
  • 4: "Reusable (Unique only)": If set, the trigger_random with 'Unique' flag can be used again after having fired its targets, handling all of them as if not triggered before again.
  • 8: "Timed": Enables 'Minimum/Maximum delay' keyvalues so you can specify to wait a random amount of time before triggering random targets. When 'Trigger Once' and 'Start On' flags are NOT selected, triggering this trigger_random starts the timer, and it will fire it's targets with random delays repeatedly until triggered again, what pauses it.
  • 16: "Unique": Trigger will pick target (each time it's triggered), that haven't been triggered yet, randomly. So if four targets are specified, the combination in which they can be picked may be: 3th, 1th, 2th, 4th. It never repeats the same target unless 'Reusable' flag is selected- the list will be "shuffled", and targets can be picked all over again.
Clone this wiki locally