In Uru, the root objects are called scene objects. These are analogous to Objects in Blender, which can contain Meshes, Camera's, Lamps, etc.
To avoid confusion, these "blender objects" will be called "scene objects" in this guide.
Subscripts and Objects
(needed introduction to tags)
In the description of objects in Logic Script, a heavy use is made of the AlcScript feature known as "SubScripts" or "recursive scripting". Basically, that means that any key can have a new subset of keys as a value, which is - for all intents and purposes - a script in itself. Thus called a SubScript
Logic Script makes a heavy use of this, in order to build up dependencies in objects as logically as reasonably possible. A vivid example of this is in Logic Modifiers.
Logic Modifiers in itself are SubScripts in a list of logic modifiers.
<object name>: logic: modifiers: - <Logic Modifier SubScript #1> .... - <Logic Modifier SubScript #2> ....
These SubScripts #1 and #2 describe an entire logic modifier object.
Logic Modifiers also contain three keys that have arrays of other SubScripts as their value:
<scene object name>: logic: modifiers: - activators: - <Activator SubScript #1> .... - <Activator SubScript #2> .... - conditions: - <Condition SubScript #1> .... - <Condition SubScript #2> .... - actions: - <Action SubScript #1> .... - <Action SubScript #2> ....
In these cases, each SubScript, defines another object, it's meaning relative to the key it is found under.
In the course of this document, the term SubScript will mean "an AlcScript SubScript that actually describes another class". The term Object Description will be used in this meaning as well.
Naming and Tagging
As a SubScript defines a different object, it will need a name to go by. Both in the PRP file, and to refer it by in the Logic Script.
Logic Scripting provides two methods of giving a name to an Object Description or SubScript:
- Naming (absolute)
- By adding the key "name" to the SubScript and giving it a value, the object's name will be whatever name you specify in that key (<name value>).
- Tagging (relative)
- You can also use the key "tag" instead.
- In that case, the objects name will be determined by adding a "_" and the value of the "tag" key after the name of the blender object. (<object name>_<tag name>)
- By default tags are as specified above: relative to the scene objects name
- Exception: Activator SubScripts and Condition SubScripts within Logic Modifiers will have their tags relative to the Logic Modifiers name instead.
In some cases, a Logic Script key will need a reference to another object. In those cases, there are three ways to specify another object:
- Use "/" as the value of that key.
- The name of the current scene object will be used for that reference (linked to an object of the relevant type ofcourse)
- Use "$<tag name>" as the value of that key.
- The tag will be decoded relative to the current scene object (or the current Logic Modifier in case of Activator or Condition SubScripts)
- Use ":<name>" as the value of that key.
- By using this you will be able to specify objects that are not described within the Logic Script for the current scene object
- Full Reference (for advanced users only)
- Use "<object type>:<name>[@<page>]" as the value of that key.
- You can use this to add a reference to about any kind of object available in Uru.
- Note: <object type> can be a hexadecimal number (the objects type nr) or one of the predefined names for it.
More information about these references can be found at the Beginners Guide To AlcScript