Atdm:target postscriptevent

From The DarkMod Wiki
Revision as of 11:11, 23 July 2009 by Tels (talk | contribs) (add)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 are important 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.