Atdm:target callobjectfunction: Difference between revisions
meh :- |
→Door locks: removed as didn't work |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
== Introduction == | == Introduction == | ||
The entity '''atdm:: | The entity '''atdm::target_callobjectfunction''' is a useful entity to call one script object function on multiple entities. | ||
The main difference between this entity and [[atdm:target_postscriptevent]] is as follows: | The main difference between this entity and [[atdm:target_postscriptevent]] is as follows: | ||
* atdm:target_callobjectfunction only works on | * atdm:target_callobjectfunction only works on entities that have a script object associated with them | ||
* atdm:target_callobjectfunction can only call functions defined in that script object (general script events like "Off" are not supported? check this) | * atdm:target_callobjectfunction can only call functions defined in that script object (general script events like "Off" are not supported? check this) | ||
* atdm:target_postscriptevent cannot (yet) call object functions as a fallback | * atdm:target_postscriptevent cannot (yet) call object functions as a fallback | ||
Currently it is a bit difficult to know when to use which of these two entities | Currently it is a bit difficult to know when to use which of these two entities. They will hopefully be merged into one target entity soon. | ||
== Usage == | == Usage == | ||
Line 29: | Line 29: | ||
=== delay (float, default: 0) === | === delay (float, default: 0) === | ||
The '''delay''' spawnarg specifies an initial delay in seconds, before the first call will be done. | |||
The '''delay''' spawnarg specifies an initial delay in seconds, before the first | |||
=== wait (float, default: 0) === | === wait (float, default: 0) === | ||
The '''wait''' spawnarg specifies the delay in seconds between each subsequent call (e.g. between one and the next target). | |||
The '''wait''' spawnarg specifies the delay in seconds between each subsequent | |||
== Examples == | == Examples == | ||
=== Lights === | |||
See the map test/trigger_teleport.map for an example on how to turn lights on/off. | See the map test/trigger_teleport.map for an example on how to turn lights on/off. | ||
== See also == | |||
*[[Script Events User-Friendly List]] | |||
{{editing}} | {{editing}} |
Latest revision as of 01:31, 21 March 2014
Introduction
The entity atdm::target_callobjectfunction is a useful entity to call one script object function on multiple entities.
The main difference between this entity and atdm:target_postscriptevent is as follows:
- atdm:target_callobjectfunction only works on entities that have a script object associated with them
- atdm:target_callobjectfunction can only call functions defined in that script object (general script events like "Off" are not supported? check this)
- atdm:target_postscriptevent cannot (yet) call object functions as a fallback
Currently it is a bit difficult to know when to use which of these two entities. They will hopefully be merged into one target entity soon.
Usage
This entity is very useful to manipulte combined light entities.
Spawnargs
The following spawnargs can be used on this entity:
call
The call spawnarg gives the name of the script object function to call. Examples are:
- "LightsOff", "LightsOn", "LightsToggle" (for lights)
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 (float, default: 0)
The delay spawnarg specifies an initial delay in seconds, before the first call will be done.
wait (float, default: 0)
The wait spawnarg specifies the delay in seconds between each subsequent call (e.g. between one and the next target).
Examples
Lights
See the map test/trigger_teleport.map for an example on how to turn lights on/off.