Changes for page Mission Director Guide

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

From version 31073.1
edited by Daniel Turner
on 2023/04/14 17:10
Change comment: There is no comment for this version
To version 31075.1
edited by Daniel Turner
on 2023/04/14 17:13
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -206,11 +206,21 @@
206 206  
207 207  (% style="color: rgb(0,0,0);text-decoration: none;" %)Check conditions every 5 seconds, but start checking only 1 hour after game start.
208 208  
209 -{{code}}<cue name="Foo" checktime="1h" checkinterval="5s">  <conditions>  [...]</cue>{{/code}}
209 +{{code language="xml"}}
210 +<cue name="Foo" checktime="1h" checkinterval="5s">
211 + <conditions>
212 + [...]
213 +</cue>
214 +{{/code}}
210 210  
211 211  (% style="color: rgb(0,0,0);text-decoration: none;" %)Check conditions 3 seconds after the cue is enabled, and cancel the cue in case of failure.
212 212  
213 -{{code}}&lt;cue name=&quot;Foo&quot; checktime=&quot;player.age + 3s&quot; onfail=&quot;cancel&quot;&gt;  &lt;conditions&gt;  [...]&lt;/cue&gt;{{/code}}
218 +{{code language="xml"}}
219 +<cue name="Foo" checktime="player.age + 3s" onfail="cancel">
220 + <conditions>
221 + [...]
222 +</cue>
223 +{{/code}}
214 214  
215 215  (% style="color: rgb(0,0,0);text-decoration: none;" %)(% style="color: rgb(0,0,0);text-decoration: none;" %)(% style="color: rgb(0,0,0);text-decoration: none;" %)The attributes //onfail//, //checkinterval//, //checktime// are not allowed for cues with event conditions.
216 216  
... ... @@ -230,11 +230,15 @@
230 230  
231 231  (% style="color: rgb(0,0,0);text-decoration: none;" %)The <actions> node contains the actions that are performed one after another, without any delay inbetween. You can enforce a delay after activation of the cue and actual action performance, using a <delay> node right before the <actions>:
232 232  
233 -{{code}}&lt;delay min=&quot;10s&quot; max=&quot;30s&quot;/&gt;{{/code}}
243 +{{code language="xml"}}
244 +<delay min="10s" max="30s"/>
245 +{{/code}}
234 234  
235 235  (% style="color: rgb(0,0,0);text-decoration: none;" %)Note that during the delay the cue is already in the active state, and the sub-cues have been enabled! If you want to make sure that a sub-cue only becomes active after this cue is complete, there is a useful event condition for that:
236 236  
237 -{{code}}&lt;event_cue_completed cue=&quot;parent&quot;/&gt;{{/code}}
249 +{{code language="xml"}}
250 +<event_cue_completed cue="parent"/>
251 +{{/code}}
238 238  
239 239  (% style="color: rgb(0,0,0);text-decoration: none;" %)<actions> is optional. Leaving it out may be useful if you only want to enable sub-cues after the cueΓÇÖs condition check. The state transition from active to complete will still take the <delay> node into account.
240 240  
... ... @@ -242,8 +242,18 @@
242 242  
243 243  (% style="color: rgb(0,0,0);text-decoration: none;" %)Example, which selects one of the three texts randomly:
244 244  
245 -{{code}}&lt;actions&gt; &lt;do_any&gt;   &lt;debug_text text=&quot;'Hello world'&quot;/&gt;   &lt;debug_text text=&quot;'Welcome to the MD'&quot;/&gt;   &lt;debug_text text=&quot;'And now for something completely different'&quot;/&gt; &lt;/do_any&gt;&lt;actions&gt;{{/code}}
259 +{{code language="xml"}}
260 +<actions>
261 + <do_any>
262 + <debug_text text="'Hello world'"/>
263 + <debug_text text="'Welcome to the MD'"/>
264 + <debug_text text="'And now for something completely different'"/>
265 + </do_any>
266 +<actions>
267 +{{/code}}
246 246  
269 +
270 +
247 247  {{note body="<span style=~"color: rgb(0,0,0);text-decoration: none;~">Messages printed with &lt;debug_text&gt; are usually only visible when the ΓÇ£scriptsΓÇ¥ debug filter is enabled, see [[NULL|Script debug output]].</span>"/}}
248 248  
249 249