Virtual Choreographer Reference Guide (version 1.4) | ||
---|---|---|
Prev | Chapter 4. VC Macro-Commands, parameters, and variables | Next |
<set> ‐ A macro command for parameter value assignment
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:
a string attribute id,
and one of the following three attributes:
a string attribute string_value for a string parameter,
a float attribute float_value for a float parameter,
an integer attribute int_value for an integer parameter,
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" />