Atdm:target postscriptevent: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
(add)
 
m (add propagate_to_team)
Line 7: Line 7:
== Spawnargs ==
== Spawnargs ==


The following spawnargs are important on this entity:
The following spawnargs can be used on this entity:


=== event ===
=== event ===
Line 21: Line 21:
and so on. A full list of available events can be found in the files <code>script/doom_events.script</code> and <code>script/tdm_events.script</code>.
and so on. A full list of available events can be found in the files <code>script/doom_events.script</code> and <code>script/tdm_events.script</code>.


== delay ==
=== delay ===


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


== wait ==
=== wait ===


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


== pass_self ==
=== 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 <code>teleportTo</code>.
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 <code>teleportTo</code>.
=== 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 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.

Revision as of 16:43, 23 July 2009

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 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.