4.4. Set (element)

<set> ‐ A macro command for parameter value assignment

4.4.1. Attributes

NameTypeDefaults
idSTRINGNone (required)
string_valueINTEGERNone (required)
float_valueFLOATNone (required)
int_valueSTRINGNone (required)
operatorSTRINGNone (required)

4.4.2. Description

The <set> macro-command is used to define the value of a parameter that will be accessible inside the scope the of the <set> mark. The set element must contain a node.

The <set> element has two attributes:

4.4.3. Example

The following macro-command sets a float parameter p that can be referenced through {#p} in expressions formulated in the scope of the <set> element.

<set id="p" float_value="(rand(0,10)+50)">
</set>

Empty set elements are used to define the value of a parameter that will be permanently accessible during scene compiling from the statement to the end of the scene description. The parameter will also be accessible in sub-scenes referenced through a <use> element. Empty set elements can also be stated inside the configuration file. They define parameters that can be accessed anywhere in the scene file or in sub-scenes. The following macro-command sets a string parameter night that can be referenced through {#night}:

<set id="night" string_value="-night" />