Atdm:target postscriptevent

From The DarkMod Wiki
Revision as of 16:44, 23 July 2009 by Tels (talk | contribs) (fix link)
Jump to navigationJump to search

Introduction

The entity atdm::target_postscriptevent is a useful entity to call one script function (aka "post the script event to the entity") on multiple entities.

The entity is used for instance by atdm:teleport to teleport one or more entities.

Spawnargs

The following spawnargs can be used on this entity:

event

The event spawnarg gives the name of the script event. Examples:

  • "teleportTo" (in combination with "pass_self" "1"!)
  • "Off", "On" (for lights)
  • "remove" (deletes that entity)
  • "activate" (activate that entity)
  • "activateTargets"

and so on. A full list of available events can be found in the files script/doom_events.script and script/tdm_events.script.

delay

The delay spawnarg specifies an initial delay in seconds, before the first event will be fired.

wait

The wait spawnarg specifies the delay in seconds between each subsequent event (e.g. between one and the next target).

pass_self

For certain events that require as parameter an entity, you can set pass_self to true. The event will then get the trigger entity passed along as first parameter. Useful and mandatory for instance for teleportTo.

propagate_to_team

If propagate_to_team is set to true ("1"), then the event will also be posted to any bound children of the targeted entities. This is important if you target combined light entities, like a candle holder. Instead of sending Off() to the holder, you want it to arrive at the flame, but cannot target the flame in your map because it does not exist yet.

Events that are not suited for one type of entity (like Off() for non-lights) will be safely filtered out, so you can target them without worry at the base entity.