Scripting:Targeting

Building pieces of another world.
Revision as of 16:33, 20 June 2014 by gravatar The Watcher [userbureaucratsysopPHRhYmxlIGNsYXNzPSJ0d3BvcHVwIj48dHI+PHRkIGNsYXNzPSJ0d3BvcHVwLWVudHJ5dGl0bGUiPkdyb3Vwczo8L3RkPjx0ZD51c2VyPGJyIC8+YnVyZWF1Y3JhdDxiciAvPnN5c29wPGJyIC8+PC90ZD48L3RyPjwvdGFibGU+] (talk | contribs)
Jump to navigation Jump to search

This page shows all the possible forms of value you can specify for a target type parameter. The values supported by a given script will vary depending on the situation, and sometimes it may not make much sense to use a given value even if the script does not explicitly prohibit it. In general the script documentation will indicate which values are likely to be appropriate.

Object only values

The following values can be used in any situation where an object or group of objects should be targeted, regardless of whether they are linked to the script host object or not.

parameter=[me]
Targets the object the script is attached to.
parameter=[source]
All actions taken by scripts happen in response to messages received by the object the script is attached to. This option allows the script to target the object that sent the message that is currently being handled by the script. Note that this should be used with caution
parameter=*<archetype>
Targets all direct concrete descendants of the specified archetype. So, for example, parameter=*Chest will target all concrete Chest objects in your level, but not any concrete Safe, VicHopeChest, LC_Chest, or other indirect descendants of the Chest archetype.
parameter=@<archetype>
Targets all direct or indirect concrete descendants of the specified archetype. For example, parameter=@Chest will target all concrete Chest objects in your level and any concrete Safe, VicHopeChest, or other indirect descendants of the Chest archetype.


Authors

  • gravatar The Watcher [userbureaucratsysopPHRhYmxlIGNsYXNzPSJ0d3BvcHVwIj48dHI+PHRkIGNsYXNzPSJ0d3BvcHVwLWVudHJ5dGl0bGUiPkdyb3Vwczo8L3RkPjx0ZD51c2VyPGJyIC8+YnVyZWF1Y3JhdDxiciAvPnN5c29wPGJyIC8+PC90ZD48L3RyPjwvdGFibGU+]