Skip to main content

trigger_random

trigger_random icon
Point entityPorted from FeaturefulSven Co-op

A trigger_random fires one of up to 16 targets at random, either once for each trigger or, with Timed, again and again after random delays.

Attributes​

The entity also has these common keys:

KeyDescriptionDefault
Number of targetstarget_count

Sets how many target slots it picks from, where 0 means up to the last slot you filled.

Default 0
Target 1target1

One of the targets it picks from.

Target 2target2

One of the targets it picks from.

Target 3target3

One of the targets it picks from.

Target 4target4

One of the targets it picks from.

Target 5target5

One of the targets it picks from.

Target 6target6

One of the targets it picks from.

Target 7target7

One of the targets it picks from.

Target 8target8

One of the targets it picks from.

Target 9target9

One of the targets it picks from.

Target 10target10

One of the targets it picks from.

Target 11target11

One of the targets it picks from.

Target 12target12

One of the targets it picks from.

Target 13target13

One of the targets it picks from.

Target 14target14

One of the targets it picks from.

Target 15target15

One of the targets it picks from.

Target 16target16

One of the targets it picks from.

Minimum delaymin_delay

With Timed, sets the shortest delay between two fires, in seconds.

Default 0
Maximum delaymax_delay

With Timed, sets the longest delay between two fires, in seconds.

Default 0
Trigger number limittrigger_number

With Timed, sets how many times it fires before it turns off, where 0 means no limit.

Default 0
Trigger on limittrigger_on_limit

Fires when it reaches the Trigger number limit.

Trigger when all firedtrigger_on_exhaust

With Unique, fires when every target has fired once.

First target to firefirst_target

Sets the slot from 1 to 16 that fires first, where 0 picks one at random.

Default 0
Reset at round startround_reset

With Yes, the entity goes back to its state at map load at each round start, before the players spawn. See Round hooks for more details.

  • No (0)
  • Yes (1)
Default No (0)

Flags​

1Start on

With Timed, it starts firing when the map starts

2Trigger once

With Timed, it fires once each time it is started, and then stops

4Reusable

With Unique, once every target has fired, all of them can be picked again

8Timed

Every trigger starts or stops it, and the use type makes no difference. While it runs, it fires a random target after each random delay between Minimum delay and Maximum delay

16Unique

Each target only fires once until all of them have fired

32Not repetitive

The same target never fires twice in a row, if there are two or more

64Scheduled order

The random picks follow a sequence that is fixed when the map starts

128Scheduled delays

With Timed, the random delays follow a sequence that is fixed when the map starts

Notes​

  • Without Timed, the target gets the activator of the trigger. With Timed, the trigger_random is the activator
  • An empty slot between filled slots can be picked, and then nothing fires
  • A target that triggers the same trigger_random while it fires is ignored
  • Maps from Sven Co-op may call this entity trigger_random_time, and SBO accepts that name too. It is a trigger_random with Timed set. trigger_random_unique is a trigger_random with Unique set

See also​

Changes since 1.38​

  • trigger_random is new