Skip to main content

trigger_entity_iterator

trigger_entity_iterator icon
Point entityPorted from SevenKewpSven Co-op

A trigger_entity_iterator fires its target once for each entity that passes its filters, with that entity as !activator. For example, it can fire once for every player, or once for every monster named wave2.

Attributes​

The entity also has these common keys:

KeyDescriptionDefault
Filter entities by namename_filter

Only counts entities with this name.

If you leave this key empty, any name counts.

Filter entities by class nameclassname_filter

Only counts entities of this class.

If you leave this key empty, any class counts.

Filter entities by statusstatus_filter

Only counts living or only dead entities. Players never count as dead, because the iterator skips players who aren't alive.

  • No filter (0)
  • Only living entities (1)
  • Only dead entities (never players) (2)
Default No filter (0)
Target for each entitytarget

Fires this target once for each entity. !activator and !caller in this key are the iterator's own activator and caller.

Trigger state for each entitytriggerstate

Sets the use type the target gets.

  • Off (0)
  • On (1)
  • Toggle (2)
Default Off (0)
Run moderun_mode

Sets how a trigger runs the passes over the entities.

  • Run once (0) - Each trigger makes one pass
  • Run once, multiple runs at once (1) - Each trigger starts its own pass, even while another is running
  • Toggle on/off (2) - A trigger starts passes that repeat until you trigger it again
Default Run once (0)
Maximum runsmaximum_runs

With "Toggle on/off", sets how many passes it makes, and 0 means no limit.

Default 0
Delay between entitiesdelay_between_triggers

Sets how many seconds pass between two entities of one pass. With 0, it does the whole pass at once.

Default 0
Delay between runsdelay_between_runs

With "Toggle on/off", sets how many seconds pass between two passes.

Default 0
Trigger after each runtrigger_after_run

Fires this target at the end of each pass. If the activator is gone by then, the iterator itself is the activator.

Reset at round startround_reset

With Yes, the entity goes back to the way it was when the map loaded, at each round start before the players spawn. See Round hooks for more details.

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

Notes​

  • Players only count while they are alive. The iterator also skips entities that the game is removing
  • A target that triggers the iterator while it runs doesn't start a new run, but Off or Toggle stops the run
  • The class name, key names and values are the same as in Sven Co-op, but SBO only goes through alive players

See also​

  • trigger_sensor - fires for each entity within a radius
  • Round hooks - the names the game fires at round starts, with the world as activator

Changes since 1.38​

  • trigger_entity_iterator is new