Code: Select all
<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet href="director.xsl" type="text/xsl" ?>
<director name="test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="director.xsd">
<cues>
<cue name="beispiel5_cue001">
<action>
<do_all>
<!--finde ne station und setze marker drauf-->
<find_station name="beispiel5_cue001.gefundene_station" nearest="1"/>
<!--ne IF ELSE abfrage-->
<do_choose>
<!--abfrage, ob die station nicht existiert-->
<do_when value="{object.exists@beispiel5_cue001.gefundene_station}" exact="0">
<incoming_message text="... keine station gefunden ..."/>
<cancel_cue cue="beispiel5_cue001"/>
</do_when>
<!--anderenfalls-->
<do_otherwise>
<!--erstelle missionsanweisung-->
<create_briefing cue="beispiel5_cue001">
<objectives>
<objective step="1">
<flyto object="beispiel5_cue001.gefundene_station"/>
</objective>
<objective step="2">
<custom action="... tue dies ..."/>
</objective>
<objective step="3">
<custom action="... tue das in bezug auf ..." text="{object.name@beispiel5_cue001.gefundene_station}"/>
</objective>
</objectives>
</create_briefing>
<!--setze marker FLIEGE ZUR STATION-->
<set_objective cue="beispiel5_cue001">
<!--verbinde missionsanweisung + missionsschritt mit marker-->
<briefing cue="beispiel5_cue001" step="1"/>
<flyto object="beispiel5_cue001.gefundene_station"/>
</set_objective>
</do_otherwise>
</do_choose>
</do_all>
</action>
<cues>
<!--reagiert auf annaeherung-->
<cue name="beispiel5_cue002" delay="3s">
<condition>
<check_all>
<cue_is_complete cue="beispiel5_cue001"/>
<object_exists object="beispiel5_cue001.gefundene_station"/>
<!--distanz zwischen spieler und station unter 2km-->
<object_position object="{player.ship}" max="2km">
<position object="beispiel5_cue001.gefundene_station"/>
</object_position>
</check_all>
</condition>
<action>
<do_all>
<incoming_message text="...bist unter 2km an der station ran."/>
<!--setze marker auf schritt 2 der missionsanweisung-->
<set_objective cue="beispiel5_cue001">
<briefing cue="beispiel5_cue001" step="2"/>
<custom action="... tue dies ..."/>
</set_objective>
</do_all>
</action>
</cue>
<!--reagiert auf abbruch-->
<cue name="beispiel5_cue003">
<condition>
<check_all>
<objective_cancelled cue="beispiel5_cue001"/>
</check_all>
</condition>
<action>
<do_all>
<!--zeige an, dass mission abgebrochen wurde-->
<remove_objective cue="beispiel5_cue001" status="aborted"/>
<!--stoppe alle cues-->
<cancel_cue cue="beispiel5_cue001"/>
</do_all>
</action>
</cue>
</cues>
</cue>
</cues>
</director>