Changes for page Mission Director Guide

Last modified by Klaus Meyer on 2025/03/31 16:39

From version 32953.1
edited by Daniel Turner
on 2023/08/22 18:58
Change comment: There is no comment for this version
To version 32954.1
edited by Daniel Turner
on 2023/08/22 19:00
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1188,21 +1188,33 @@
1188 1188  
1189 1189  To remove variables or list/table entries, use <remove_value>:
1190 1190  
1191 -{{code language="xml"}}<remove_value name="$foo" /><remove_value name="$list.{1}" /><remove_value name="$table.$foo" />{{/code}}\\
1191 +{{code language="xml"}}
1192 + <remove_value name="$foo" />
1193 + <remove_value name="$list.{1}" />
1194 + <remove_value name="$table.$foo" />
1195 +{{/code}}
1192 1192  
1193 1193  Removing an entry from a list shifts all following elements down by one. If you want to clear an entry without removing it from the list, just use <set_value> instead.
1194 1194  
1195 -\\\\\\(% id="accessing-remote-variables" %)
1199 +(% id="accessing-remote-variables" %)
1196 1196  
1197 1197  == Accessing remote variables ==
1198 1198  
1199 1199  You can also read and write variables in other cues by using the variable name as property key:
1200 1200  
1201 -{{code language="xml"}}<set_value name="OtherCue.$foo" min="0.0" max="1.0" /><set_value name="md.OtherScript.YetAnotherCue.$bar" exact="OtherCue.$foo" />{{/code}}
1205 +{{code language="xml"}}
1206 + <set_value name="OtherCue.$foo" min="0.0" max="1.0" />
1207 + <set_value name="md.OtherScript.YetAnotherCue.$bar" exact="OtherCue.$foo" />
1208 +{{/code}}
1202 1202  
1203 1203  Instead of referencing a cue by name, you could also reference it via a keyword or another variable:
1204 1204  
1205 -{{code language="xml"}}<set_value name="static.$counter" operation="add" /><set_value name="parent.$foo" exact="42" /><set_value name="this.$bar" exact="parent" /><set_value name="$baz" exact="this.$bar.$foo" />{{/code}}
1212 +{{code language="xml"}}
1213 + <set_value name="static.$counter" operation="add" />
1214 + <set_value name="parent.$foo" exact="42" />
1215 + <set_value name="this.$bar" exact="parent" />
1216 + <set_value name="$baz" exact="this.$bar.$foo" />
1217 +{{/code}}
1206 1206  
1207 1207  \\\\\\(% id="namespaces" %)
1208 1208  
... ... @@ -1212,7 +1212,16 @@
1212 1212  
1213 1213  Consider this case:
1214 1214  
1215 -{{code language="xml"}}<cue name="Root"> <actions> <set_value name="$foo" /> </actions> <cues> <cue name="SubCue"> [...] </cue> </cues></cue>{{/code}}
1227 +{{code language="xml"}}
1228 + <cue name="Root">
1229 + <actions>
1230 + <set_value name="$foo" />
1231 + </actions>
1232 + <cues>
1233 + <cue name="SubCue"> [...] </cue>
1234 + </cues>
1235 + </cue>
1236 +{{/code}}
1216 1216  
1217 1217  When the root cue creates $foo, the variable is stored in the Root cue directly. But SubCue and its descendants will also need access to $foo. Of course they could write "parent.$foo" or "Root.$foo", but since it's very common to have a single location for most variables in the whole cue tree, the easy solution is to write just "$foo" - because variable names are looked up in the **namespace cue**, which is the root by default. Also newly created variables end up in the namespace, and not in "this" cue.
1218 1218  
... ... @@ -1236,5 +1236,5 @@
1236 1236   <param name="Param1" value="$foo" /> <!-- $foo from parent namespace -->
1237 1237   <param name="Param2" value="namespace.$foo" /> <!-- LibRef.$foo (error) -->
1238 1238   </cue>
1239 - {{/code }}
1260 +{{/code }}
1240 1240  {{/warning}}