Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/data/levels/missionOne.oxw @ 10965

Last change on this file since 10965 was 9985, checked in by jo, 11 years ago

Ending missionOne.

  • Property svn:eol-style set to native
File size: 61.7 KB
Line 
1<!---->
2<LevelInfo
3 name = "Mission One"
4 description = "Codename: Awakening - First Guided Steps in the Orxonoxian Universe."
5 screenshot = "missionOne.png"
6 tags = "mission"
7/>
8
9<?lua
10  include("stats.oxo")
11  include("HUDTemplates3.oxo")
12  include("templates/lodInformation.oxt")
13  include("templates/spaceshipAssff.oxt")
14  include("templates/spaceshipPirate.oxt")
15  include("templates/spaceshipSpacecruiser.oxt")
16  include("templates/spaceshipTransporter.oxt")
17?>
18
19<?lua
20include("templates/pickupRepresentationTemplates.oxt")
21?>
22
23<Level
24 gametype     = "Mission"
25>
26  <templates>
27    <Template link=lodtemplate_default />
28  </templates>
29  <?lua include("includes/notifications.oxi") ?>
30
31  <NotificationQueueCEGUI
32    name="narrative"
33    targets="simpleNotification"
34    size=3
35    displayTime=3.9
36    position="0.2, 0, 0.1, 0"
37    fontSize="23"
38    fontColor="0.3, 1, 0.2, 0.8"
39    alignment="HorzCentred"
40    displaySize="0.6, 0, 0, 0"
41    />
42  <Scene
43    ambientlight = "0.8, 0.8, 0.8"
44    skybox       = "Orxonox/Starbox"
45  >
46    <?lua
47      include("includes/pickups.oxi")
48    ?>
49
50    <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" /> <!-- AlphaCentauri.ogg, Mars.ogg-->
51
52    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
53<!-- END OF INCLUDES & NECESSARITIES -->
54
55<!-- SPAWNPOINT & START OF QUESTS via spawntrigger -->
56    <EventMultiTrigger name=spawntrigger>
57        <events>
58            <trigger>
59                <TeamSpawnPoint team=0 position="800,700,600" direction="-1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff>
60                  <EventTrigger invert=true>
61                    <events>
62                      <trigger>
63                        <EventListener event="attack" />
64                      </trigger>
65                    </events>
66                  </EventTrigger>
67                </TeamSpawnPoint>
68            </trigger>
69        </events>
70    </EventMultiTrigger>
71
72        <QuestEffectBeacon times=1>
73            <effects>
74                <AddQuest questId="missionOne.basicFlying" />
75                <!--AddQuestHint hintId ="quest1hint3" /-->
76            </effects>
77            <events>
78                <execute>
79                    <EventListener event=spawntrigger />
80                </execute>
81            </events>
82        </QuestEffectBeacon>
83
84        <QuestEffectBeacon times=1>
85            <effects>
86                <CompleteQuest questId="missionOne.basicFlying" />
87            </effects>
88            <events>
89                <execute>
90                    <EventListener event="flying4" />
91                </execute>
92            </events>
93        </QuestEffectBeacon>
94
95        <QuestEffectBeacon times=1>
96            <effects>
97                <CompleteQuest questId="missionOne.navigation" />
98            </effects>
99            <events>
100                <execute>
101                    <EventListener event="navigationend" />
102                </execute>
103            </events>
104        </QuestEffectBeacon>
105
106<!--helper trigger to end the weaponsystemI quest -->
107    <DistanceTrigger name="boxend" position="0,0,0" distance=950 target="SpaceShip" stayActive="false" delay=0.1>
108              <EventTrigger>
109                <events>
110                  <trigger>
111                    <EventListener event="boxtrigger4" />
112                  </trigger>
113                </events>
114              </EventTrigger>
115    </DistanceTrigger>
116
117        <QuestEffectBeacon times=1>
118            <effects>
119                <CompleteQuest questId="missionOne.weaponsystemI" />
120            </effects>
121            <events>
122                <execute>
123                    <EventListener event="boxend" />
124                </execute>
125            </events>
126        </QuestEffectBeacon>
127
128<!--helper trigger to end the weaponsystemII quest -->
129    <DistanceTrigger name="piratesend" position="0,0,0" distance=2000 target="SpaceShip" stayActive="false" delay=0.1>
130              <EventTrigger>
131                <events>
132                  <trigger>
133                    <EventListener event="movingpirates2" />
134                  </trigger>
135                </events>
136              </EventTrigger>
137    </DistanceTrigger>
138
139        <QuestEffectBeacon times=1>
140            <effects>
141                <CompleteQuest questId="missionOne.weaponsystemII" />
142            </effects>
143            <events>
144                <execute>
145                    <EventListener event=piratesend />
146                </execute>
147            </events>
148        </QuestEffectBeacon>
149
150<!--helper trigger to end the DuBallStation quest -->
151    <DistanceTrigger name="duballend" position="-1000,-300,700" distance=2000 target="SpaceShip" stayActive="false" delay=0.1>
152              <EventTrigger>
153                <events>
154                  <trigger>
155                    <EventListener event="duball3" />
156                  </trigger>
157                </events>
158              </EventTrigger>
159    </DistanceTrigger>
160
161
162        <QuestEffectBeacon times=1>
163            <effects>
164                <CompleteQuest questId="missionOne.DuballStation" />
165            </effects>
166            <events>
167                <execute>
168                    <EventListener event=duballend />
169                </execute>
170            </events>
171        </QuestEffectBeacon>
172
173        <QuestEffectBeacon times=1> <!--  alternative quest end  -->
174            <effects>
175                <CompleteQuest questId="missionOne.DuballStation" />
176            </effects>
177            <events>
178                <execute>
179                    <EventListener event=toHydroFarmer />
180                </execute>
181            </events>
182        </QuestEffectBeacon>
183
184<!--helper trigger to end the getHelp quest -->
185    <DistanceTrigger name="getHelpEnd" position="-47000,-1000,1300" distance=1400 target="SpaceShip" stayActive="false" delay=0.1>
186              <EventTrigger>
187                <events>
188                  <trigger>
189                    <EventListener event="ondock" />
190                  </trigger>
191                </events>
192              </EventTrigger>
193    </DistanceTrigger>
194
195        <QuestEffectBeacon times=1>
196            <effects>
197                <CompleteQuest questId="missionOne.getHelp" />
198            </effects>
199            <events>
200                <execute>
201                    <EventListener event=getHelpEnd />
202                </execute>
203            </events>
204        </QuestEffectBeacon>
205
206<!--helper trigger to end the getHome quest -->
207    <DistanceTrigger name="getHomeEnd" position="0,0,0" distance=4000 target="SpaceShip" stayActive="false" delay=0.1>
208              <EventTrigger>
209                <events>
210                  <trigger>
211                    <EventListener event="attack" />
212                  </trigger>
213                </events>
214              </EventTrigger>
215    </DistanceTrigger>
216
217        <QuestEffectBeacon times=1>
218            <effects>
219                <CompleteQuest questId="missionOne.getHome" />
220            </effects>
221            <events>
222                <execute>
223                    <EventListener event=getHomeEnd />
224                </execute>
225            </events>
226        </QuestEffectBeacon>
227
228<!--helper trigger to end the defence quest -->
229    <DistanceTrigger name="defenceEnd" position="0,0,0" distance=4000 target="SpaceShip" stayActive="false" delay=0.1>
230              <EventTrigger>
231                <events>
232                  <trigger>
233                    <EventListener event="attacktrigger6" />
234                  </trigger>
235                </events>
236              </EventTrigger>
237    </DistanceTrigger>
238
239        <QuestEffectBeacon times=1>
240            <effects>
241                <CompleteQuest questId="missionOne.defence" />
242            </effects>
243            <events>
244                <execute>
245                    <EventListener event=defenceEnd />
246                </execute>
247            </events>
248        </QuestEffectBeacon>
249
250<!-- End the quest after own destruction of spacecruiser -->
251        <QuestEffectBeacon position="-100,0,0" times=1>
252            <effects>
253                <FailQuest questId="missionOne.getHelp" />
254            </effects>
255            <events>
256                <execute>
257                    <EventListener event="failQuest" />
258                </execute>
259            </events>
260            <attached>
261                <DistanceTrigger name="failQuest" position="-47000,-1000,1300" distance=2300 target="SpaceShip">
262                  <EventTrigger>
263                    <events>
264                      <trigger>
265                        <EventListener event="gameEnd" />
266                      </trigger>
267                    </events>
268                  </EventTrigger>
269                </DistanceTrigger>
270            </attached>
271        </QuestEffectBeacon>
272
273
274
275
276    <LocalQuest id="missionOne.basicFlying">
277        <QuestDescription title="Flying" description="Can you see the blinking light straight ahead? Your goal is to fly through it.
278Use (W) to accelerate and steer with your mouse.
279
280Further flying moves:
281break (S)
282roll     (Q) and (E)
283boost (Space)
284
285Whenever a new quest is added you can view it by pressing (F3). Quit this menu via (Esc)." failmessage="" completeMessage="" />
286        <complete-effects>
287            <AddQuest questId="missionOne.navigation" />
288        </complete-effects>
289    </LocalQuest>
290
291    <LocalQuest id="missionOne.navigation">
292        <QuestDescription title="Navigation" description="The next goal is to find and move towards the test targets for your weaponsystem. The three arrows that just appeared down in the right corner of your screen indicate in which direction you have to turn your spacefighter to find your next targets.
293
294Alternative navigation: There's a green circle in the left corner - the radar. The red dots on the radar represent your targets. If you manage to move your spaceship in a way such that a dot is at the center of the radar, you will be able to see the concerning object straight ahead." failmessage="" completeMessage="" />
295        <complete-effects>
296            <AddQuest questId="missionOne.weaponsystemI" />
297        </complete-effects>
298    </LocalQuest>
299
300            <LocalQuest id ="missionOne.weaponsystemI">
301                <QuestDescription title="Destroy the Boxes" description="Test your four different weapons on the four boxes:
3021. laser (left click)
3032. plasma (right click)
3043. target seeking rockets (middle click)
3054. manual rockets (T)
306
307Attention if you use manual rockets: Press (T) only once to start the rocket. If you miss your target you can get out of the rocket, by clicking or pressing (T) once more." failmessage="" completeMessage="" />
308                    <hints>
309                        <QuestHint id="missionOne.weaponsystem.laser">
310                            <QuestDescription title="Laser" description="The laser is a standard weapon. It is fast and precise but does not deal much damage." />
311                        </QuestHint>
312                        <QuestHint id="missionOne.weaponsystem.lightningGun">
313                            <QuestDescription title="Lightninggun" description="That was the lightning gun. Its plasma munition is quite slow, but a normal spaceship can't take more than three hits of such a strong weapon. That could be your favourite weapon for close range combat or if you want to hit a really slow enemy." />
314                        </QuestHint>
315                        <QuestHint id="missionOne.weaponsystem.targetSeekingRocket">
316                            <QuestDescription title="Target Seeking Rocket" description="The target seeking rockets follow slow targets on their own." />
317                        </QuestHint>
318                        <QuestHint id="missionOne.weaponsystem.manualrocket">
319                            <QuestDescription title="Manual Rocket" description="Manual rockets are your most powerful weapon. But since you have to steer it to your target yourself, you will leave your spaceship unprotected for a while. The total amount of both manual and target seeking rockets is limited to 10." />
320                        </QuestHint>
321                    </hints>
322                <complete-effects>
323                    <AddQuest questId="missionOne.weaponsystemII" />
324                </complete-effects>
325            </LocalQuest>
326
327            <LocalQuest id="missionOne.weaponsystemII">
328                <QuestDescription title="Kill the pirates" description="Get rid of the patrolling pirates.
329Find out which weapon is best to tackle moving targets. Get close enough." failmessage="" completeMessage="" />
330                <complete-effects>
331                    <AddQuest questId="missionOne.DuballStation" />
332                </complete-effects>
333            </LocalQuest>
334
335    <LocalQuest id="missionOne.DuballStation">
336        <QuestDescription title="Duball Space Station" description="Fly towards the Duball Space Station. The grey radar marker will lead you to its position." failmessage="" completeMessage="" />
337        <complete-effects>
338            <AddQuest questId="missionOne.getHelp" />
339        </complete-effects>
340    </LocalQuest>
341
342    <LocalQuest id="missionOne.getHelp">
343        <QuestDescription title="Get Help" description="There are several enemies approaching. You can't handle it on your own. Fortunately there's a shortcut to the next friendly unit. Use the portal (grey dot) to get near the Hydrogen Farmer.
344The Hydrogen Farmer is a large spaceship with three legs.
345There you might get help - as far as we know there should be a strong spaceruiser docked to the Hydrogen Farmer. In order to be able to use that stronger spaceship, you have to dock to the Hydrogen Farmer.
346Simply fly to the center of the Hydrogen Farmer, which is between its three legs.
347
348How to dock: Accept the dialogue, take your hands off the keyboard and watch." failmessage="" completeMessage="" />
349        <complete-effects>
350            <AddQuest questId="missionOne.getHome" />
351        </complete-effects>
352    </LocalQuest>
353
354    <LocalQuest id="missionOne.getHome">
355        <QuestDescription title="Return ASAP" description="So you managed to get the spacecruiser. Use the portal to return to the DuBall Space Station.
356Hurry! Your help is desperately needed." failmessage="" completeMessage="" />
357        <complete-effects>
358            <AddQuest questId="missionOne.defence" />
359        </complete-effects>
360    </LocalQuest>
361
362    <LocalQuest id="missionOne.defence">
363        <QuestDescription title="Defence" description="Seven enemies were detected that seem to launch a coordinated attack.
364Do not hesitate to fight or you will be the target.
365
366Always take care of the enemy that is the closest to you." failmessage="" completeMessage="Yeah! You did it." />
367    </LocalQuest>
368<!-- --------------------- END OF QUESTS -------------------------- -->
369
370
371    <DistanceTrigger name="spawndelaytrigger0" position="800,700,600" target="Pawn" distance=10 stayActive="true" delay=2/>
372    <SimpleNotification message="Press (F3) to see your mission briefing.">
373        <events>
374            <trigger>
375                <EventListener event="spawndelaytrigger0" />
376            </trigger>
377        </events>
378    </SimpleNotification>
379
380<!-- Blinking Billboard should be replaced with WAYPOINT -->
381<BlinkingBillboard position="-900,640,600" frequency=0.6 amplitude=3 material="Flares/lensflare" colour="1,1,0.05">
382          <events>
383            <visibility>
384              <EventTrigger invert=true>
385                <events>
386                  <trigger>
387                    <EventListener event=flying4 />
388                  </trigger>
389                </events>
390              </EventTrigger>
391            </visibility>
392          </events>
393</BlinkingBillboard>
394<Billboard position="-900,640,600" amplitude=1 material="Flares/lensflare" colour="0,0.8,0.1">
395          <events>
396            <visibility>
397              <EventTrigger>
398                <events>
399                  <trigger>
400                    <EventListener event=flying4 />
401                  </trigger>
402                </events>
403              </EventTrigger>
404            </visibility>
405          </events>
406</Billboard>
407
408<!-------------------------------------- PART ZERO: How to fly --------------------------------------->
409
410    <DistanceTrigger name="flying1" position="800,700,600" target="Pawn" distance=10 stayActive="true" delay=6/>
411    <SimpleNotification message="Let's fly to the blinking light.">
412        <events>
413            <trigger>
414                <EventListener event="flying1" />
415            </trigger>
416        </events>
417    </SimpleNotification>
418
419    <DistanceTrigger name="flying2" position="800,700,600" target="Pawn" distance=10 stayActive="true" delay=10/>
420    <SimpleNotification message="Use (W) to accelerate and the mouse to steer.">
421        <events>
422            <trigger>
423                <EventListener event="flying2" />
424            </trigger>
425        </events>
426    </SimpleNotification>
427
428<!-- QUEST-Trigger && Message Trigger: navigationend is activated after flying4 was triggered -->
429    <DistanceTrigger name="navigationend" position="0,0,0" distance=950 target="SpaceShip" stayActive="false" delay=1.1>
430        <DistanceTrigger name="flying4" position="-900,640,600" target="Pawn" distance=60 stayActive="true" delay=1/>
431    </DistanceTrigger>
432
433
434    <SimpleNotification message="Three arrows just appeared.">
435        <events>
436            <trigger>
437                <EventListener event="flying4" />
438            </trigger>
439        </events>
440    </SimpleNotification>
441
442    <DistanceTrigger name="flying5" position="-900,640,600" target="Pawn" distance=60 stayActive="true" delay=5/>
443    <SimpleNotification message="Follow those arrows.">
444        <events>
445            <trigger>
446                <EventListener event="flying5" />
447            </trigger>
448        </events>
449    </SimpleNotification>
450
451<!-------------------------------------- PART ONE : Destroy boxes --------------------------------------->
452<!-- @ triggers: spawndelaytriggerX: textoutput only if no box was destroyed -->
453    <Trigger name="spawndelaytrigger1" mode="and" stayActive="true">
454        <DistanceTrigger position="-900,640,600" target="Pawn" distance=60 stayActive="true" delay=9 />
455        <EventTrigger activations="1" invert="true">
456          <events>
457            <trigger>
458              <EventListener event="boxtrigger1" />
459            </trigger>
460          </events>
461        </EventTrigger>
462    </Trigger>
463
464    <Trigger name="spawndelaytrigger2" mode="and" stayActive="true">
465        <DistanceTrigger position="-900,640,600" target="Pawn" distance=60 stayActive="true" delay=13 />
466        <EventTrigger activations="1" invert="true">
467          <events>
468            <trigger>
469              <EventListener event="boxtrigger1" />
470            </trigger>
471          </events>
472        </EventTrigger>
473    </Trigger>
474
475    <Trigger name="spawndelaytrigger3" mode="and" stayActive="true">
476        <DistanceTrigger position="-900,640,600" target="Pawn" distance=60 stayActive="true" delay=17 />
477        <EventTrigger activations="1" invert="true">
478          <events>
479            <trigger>
480              <EventListener event="boxtrigger1" />
481            </trigger>
482          </events>
483        </EventTrigger>
484    </Trigger>
485
486<!-- @Text: How to shoot-->
487    <SimpleNotification message="Destroy the four boxes." broadcast="true">
488        <events>
489            <trigger>
490                <EventListener event="spawndelaytrigger1" />
491            </trigger>
492        </events>
493    </SimpleNotification>
494
495    <SimpleNotification message=" 1. Aim the a red cycle." broadcast="true">
496        <events>
497            <trigger>
498                <EventListener event="spawndelaytrigger2" />
499            </trigger>
500        </events>
501    </SimpleNotification>
502
503    <SimpleNotification message="2. Click! (hold the left mouse button)" broadcast="true">
504        <events>
505            <trigger>
506                <EventListener event="spawndelaytrigger3" />
507            </trigger>
508        </events>
509    </SimpleNotification>
510
511<!-- @Objects: 4 boxes (uncontrolled pawns) -->
512    <Pawn health=30 position="0,0,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box radarname = "Box 4" >
513        <events>
514          <visibility>
515            <EventListener event="flying4" />
516          </visibility>
517        </events>
518        <attached>
519            <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
520        </attached>
521        <collisionShapes>
522            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
523        </collisionShapes>
524        <controller>
525            <WaypointController team=1>
526            </WaypointController>
527        </controller>
528    </Pawn>
529
530    <Pawn health=30 position="0,100,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box radarname = "Box 3">
531        <events>
532          <visibility>
533            <EventListener event="flying4" />
534          </visibility>
535        </events>
536        <attached>
537           <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
538        </attached>
539        <collisionShapes>
540            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
541        </collisionShapes>
542        <controller>
543            <WaypointController team=1>
544            </WaypointController>
545        </controller>
546    </Pawn>
547
548    <Pawn health=30 position="0,200,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box radarname = "Box 2">
549        <events>
550          <visibility>
551            <EventListener event="flying4" />
552          </visibility>
553        </events>
554        <attached>
555           <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
556        </attached>
557        <controller>
558            <WaypointController team=1>
559            </WaypointController>
560        </controller>
561        <collisionShapes>
562            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
563        </collisionShapes>
564    </Pawn>
565
566    <Pawn health=30 position="0,300,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box radarname = "Box 1">
567        <events>
568          <visibility>
569            <EventListener event="flying4" />
570          </visibility>
571        </events>
572        <attached>
573            <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
574        </attached>
575        <collisionShapes>
576           <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
577        </collisionShapes>
578        <controller>
579            <WaypointController team=1>
580            </WaypointController>
581        </controller>
582    </Pawn>
583
584<!-- @Triggers: boxtrigger1 <-> one   box   destroyed
585                boxtrigger2 <-> two   boxes destroyed
586                boxtrigger3 <-> three boxes destroyed
587                boxtrigger4 <-> four  boxes destroyed  -->
588    <EventTrigger name="boxtrigger4" activations="1" stayactive="true" delay=0.1>
589      <events>
590        <trigger>
591          <EventListener event="box" />
592        </trigger>
593      </events>
594      <EventTrigger name="boxtrigger3" activations="1" stayactive="true" delay=0.1>
595        <events>
596          <trigger>
597            <EventListener event="box" />
598          </trigger>
599        </events>
600        <EventTrigger name="boxtrigger2" activations="1" stayactive="true" delay=0.1>
601          <events>
602            <trigger>
603              <EventListener event="box" />
604            </trigger>
605          </events>
606          <EventTrigger name="boxtrigger1" activations="1" stayactive="true" delay=0.1>
607            <events>
608              <trigger>
609                <EventListener event="box" />
610              </trigger>
611            </events>
612          </EventTrigger>
613        </EventTrigger>
614      </EventTrigger>
615    </EventTrigger>
616
617
618  <SimpleNotification message="Right click on the next target." broadcast="true">
619        <events>
620            <trigger>
621                <EventListener event="boxtrigger1" />
622            </trigger>
623        </events>
624    </SimpleNotification>
625
626  <SimpleNotification message="Middle click on the next target." broadcast="true">
627        <events>
628            <trigger>
629                <EventListener event="boxtrigger2" />
630            </trigger>
631        </events>
632    </SimpleNotification>
633
634  <SimpleNotification message="Aim at the last target and press (T)." broadcast="true">
635        <events>
636            <trigger>
637                <EventListener event="boxtrigger3" />
638            </trigger>
639        </events>
640    </SimpleNotification>
641
642  <SimpleNotification message="Try to hit the pirates while you are flying." broadcast="true">
643        <events>
644            <trigger>
645                <EventListener event="boxtrigger4" />
646            </trigger>
647        </events>
648    </SimpleNotification>
649
650
651<!--------------------------------------PART TWO: Moving targets --------------------------------------->
652
653<!-- @Objects: 2 pirates moving in squares, nonlethal -->
654                <SpaceShip position="0,2000,200" lookat="0,0,0" name="movingtarget" radarname="Pirate">
655                            <events>
656                                <visibility>
657                                    <EventListener event="boxtrigger4" />
658                                </visibility>
659                            </events>
660                    <templates>
661                      <Template link=spaceshippirate />
662                    </templates>
663                    <controller>
664                      <WaypointController team=1>
665                         <waypoints>
666                          <Model mesh="cube.mesh" scale=8 position="  0,1700,-200" />
667                          <Model mesh="cube.mesh" scale=8 position="  0,1700,-700" />
668                          <Model mesh="cube.mesh" scale=8 position="500,1700,-700" />
669                          <Model mesh="cube.mesh" scale=8 position="500,1700,-200" />
670                       </waypoints>
671                    </WaypointController>
672                  </controller>
673                </SpaceShip>
674
675                <SpaceShip position="0,2000,400" lookat="0,0,0" name="movingtarget" radarname="Pirate">
676                            <events>
677                                <visibility>
678                                    <EventListener event="boxtrigger4" />
679                                </visibility>
680                            </events>
681                  <templates>
682                    <Template link=spaceshippirate />
683                  </templates>
684                  <controller>
685                    <WaypointController team=1>
686                      <waypoints>
687                        <Model mesh="cube.mesh" scale=8 position="  0,2400,1000" />
688                        <Model mesh="cube.mesh" scale=8 position="  0,2400, 500" />
689                        <Model mesh="cube.mesh" scale=8 position="500,2400, 500" />
690                        <Model mesh="cube.mesh" scale=8 position="500,2400,1000" />
691                      </waypoints>
692                    </WaypointController>
693                  </controller>
694                </SpaceShip>
695
696<!-- @Triggers: movingpirates1 <-> one  pirate  dead
697                movingpirates2 <-> both pirates dead  -->
698    <EventTrigger name="movingpirates2" activations="1" stayactive="true" delay=0.1>
699      <events>
700        <trigger>
701          <EventListener event="movingtarget" />
702        </trigger>
703      </events>
704      <EventTrigger name="movingpirates1" activations="1" stayactive="true" delay=0.1>
705        <events>
706          <trigger>
707            <EventListener event="movingtarget" />
708          </trigger>
709        </events>
710      </EventTrigger>
711    </EventTrigger>
712
713
714    <SimpleNotification message="Now get the other one."  broadcast="true">
715        <events>
716            <trigger>
717                <EventListener event="movingpirates1" />
718            </trigger>
719        </events>
720    </SimpleNotification>
721
722    <SimpleNotification message="Fly towards the space station (grey dot)."  broadcast="true">
723        <events>
724            <trigger>
725                <EventListener event="movingpirates2" />
726            </trigger>
727        </events>
728    </SimpleNotification>
729
730
731
732<!--------------------------------------PART THREE: the space station --------------------------------------->
733    <DistanceTrigger name="duball1" position="-1000,-300,700" target="Pawn" distance=700 stayActive="true" delay=1 >
734      <events>
735        <activity>
736          <EventListener event="movingpirates2" />
737        </activity>
738      </events>
739    </DistanceTrigger>
740
741    <Trigger name="duball2" mode="and" stayActive="true">
742        <EventTrigger activations="1" stayactive="true" delay=4 >
743           <events>
744              <trigger>
745                 <EventListener event="duball1" />
746              </trigger>
747           </events>
748        </EventTrigger>
749        <EventTrigger activations="1" invert="true">
750          <events>
751            <trigger>
752              <EventListener event="toHydroFarmer" />
753            </trigger>
754          </events>
755        </EventTrigger>
756    </Trigger>
757
758    <Trigger name="duball3" mode="and" stayActive="true">
759        <EventTrigger activations="1" stayactive="true" delay=4 >
760           <events>
761              <trigger>
762                 <EventListener event="duball2" />
763              </trigger>
764           </events>
765        </EventTrigger>
766        <EventTrigger activations="1" invert="true">
767          <events>
768            <trigger>
769              <EventListener event="toHydroFarmer" />
770            </trigger>
771          </events>
772        </EventTrigger>
773    </Trigger>
774
775
776    <SimpleNotification message="Welcome to the Duball Space Station!">
777        <events>
778            <trigger>
779                <EventListener event=duball1 />
780            </trigger>
781        </events>
782    </SimpleNotification>
783
784    <SimpleNotification message="Warning: Something big is coming." broadcast="true">
785        <events>
786            <trigger>
787                <EventListener event=duball2 />
788            </trigger>
789        </events>
790    </SimpleNotification>
791
792    <SimpleNotification message="Use the portals to get help. (grey dot)" broadcast="true">
793        <events>
794            <trigger>
795                <EventListener event=duball3 />
796            </trigger>
797        </events>
798    </SimpleNotification>
799
800
801<!-- @Objects: DuBall Space Station, (no pawn!) -->
802    <StaticEntity position="-1000,-300,700" collisionType=static>
803      <attached>
804        <Model scale=13 mesh="DuBall1.mesh" position = "-100,0,0"/>
805        <Model scale=13 mesh="DuBall2.mesh" position = "100,0,0"/>
806        <Billboard scale=7 material="Examples/Flare" colour="0.5,0.5,0.5" position = "-100,0,0"/>
807        <Billboard scale=7 material="Examples/Flare" colour="0.5,0.5,0.5" position = "100,0,0"/>
808      </attached>
809      <collisionShapes>
810        <SphereCollisionShape radius="80"            position = "-100,0,0" />
811        <SphereCollisionShape radius="120"           position = "100,0,0" />
812        <BoxCollisionShape    halfExtents="90,25,45" position = "-155,0,40" />
813      </collisionShapes>
814    </StaticEntity>
815
816
817<!-- @Objects: PORTAL: from DuBall to HydroHarvester  -->
818    <Template name=PortalDefault>
819        <PortalEndPoint>
820            <attached>
821                <Billboard material="Portals/Default" />
822            </attached>
823        </PortalEndPoint>
824    </Template>
825
826    <PortalEndPoint position="-1400,-500,800" id="1" distance="50" target="MobileEntity" design="PortalDefault">
827          <events>
828            <activity>
829              <Trigger mode="or" activations="2">
830                <Trigger mode="and" activations="1">
831                  <EventTrigger>
832                    <events>
833                      <trigger>
834                        <EventListener event="movingpirates2" />
835                      </trigger>
836                    </events>
837                  </EventTrigger>
838                  <EventTrigger invert=true>
839                    <events>
840                      <trigger>
841                        <EventListener event="toHydroFarmer" />
842                      </trigger>
843                    </events>
844                  </EventTrigger>
845                </Trigger>
846                <Trigger mode="and" activations="1">
847                  <EventTrigger>
848                    <events>
849                      <trigger>
850                        <EventListener event="ondock" />
851                      </trigger>
852                    </events>
853                  </EventTrigger>
854                  <EventTrigger invert=true>
855                    <events>
856                      <trigger>
857                        <EventListener event="attack" />
858                      </trigger>
859                    </events>
860                  </EventTrigger>
861                </Trigger>
862                <EventTrigger>
863                  <events>
864                    <trigger>
865                      <EventListener event="HydroFarmer" />
866                    </trigger>
867                  </events>
868                </EventTrigger>
869              </Trigger>
870            </activity>
871          </events>
872    </PortalEndPoint>
873
874    <PortalEndPoint position="-47000,-1000,1300" id="2" distance="70" target="MobileEntity" design="PortalDefault">
875          <events>
876            <activity>
877              <Trigger mode="or" activations="3">
878                <Trigger mode="and" activations="1">
879                  <EventTrigger>
880                    <events>
881                      <trigger>
882                        <EventListener event="movingpirates2" />
883                      </trigger>
884                    </events>
885                  </EventTrigger>
886                  <EventTrigger invert=true>
887                    <events>
888                      <trigger>
889                        <EventListener event="toHydroFarmer" />
890                      </trigger>
891                    </events>
892                  </EventTrigger>
893                </Trigger>
894                <Trigger mode="and" activations="1">
895                  <EventTrigger>
896                    <events>
897                      <trigger>
898                        <EventListener event="ondock" />
899                      </trigger>
900                    </events>
901                  </EventTrigger>
902                  <EventTrigger invert=true>
903                    <events>
904                      <trigger>
905                        <EventListener event="attack" />
906                      </trigger>
907                    </events>
908                  </EventTrigger>
909                </Trigger>
910                <EventTrigger>
911                  <events>
912                    <trigger>
913                      <EventListener event="HydroFarmer" />
914                    </trigger>
915                  </events>
916                </EventTrigger>
917              </Trigger>
918            </activity>
919          </events>
920    </PortalEndPoint>
921    <PortalLink fromID="1" toID="2" />
922    <PortalLink fromID="2" toID="1" />
923<!-- ????????????????????????????????????????????????????? why does this NOT work ??
924                <Trigger mode="and" activations="1">
925                  <EventTrigger>
926                    <events>
927                      <trigger>
928                        <EventListener event="HydroFarmer" />
929                      </trigger>
930                    </events>
931                  </EventTrigger>
932                  <EventTrigger invert=true>
933                    <events>
934                      <trigger>
935                        <EventListener event="attack" />
936                      </trigger>
937                    </events>
938                  </EventTrigger>
939                </Trigger>
940-->
941<!-- PORTALS END-->
942
943
944    <SimpleNotification message="Dock to the Hydrogen Farmer." broadcast="true">
945        <events>
946            <trigger>
947                <EventListener event=toHydroFarmer />
948            </trigger>
949        </events>
950    </SimpleNotification>
951
952<!-------------------------------------- PART FOUR : Get Help --------------------------------------->
953
954    <Trigger name="famer1" mode="and" stayActive="true">
955        <DistanceTrigger position="-48200,100,0" target="Pawn" distance=650 stayActive="true" delay=0 />
956        <EventTrigger name="notGameEnd" activations="1" invert="true">
957          <events>
958            <trigger>
959              <EventListener event="gameEnd" />
960            </trigger>
961          </events>
962        </EventTrigger>
963    </Trigger>
964
965    <Trigger name="famer2" mode="and" stayActive="true">
966        <DistanceTrigger position="-48200,100,0" target="Pawn" distance=650 stayActive="true" delay=4 />
967        <EventTrigger activations="1" invert="true">
968          <events>
969            <trigger>
970              <EventListener event="gameEnd" />
971            </trigger>
972          </events>
973        </EventTrigger>
974    </Trigger>
975
976    <SimpleNotification message="We just received a message from DuBall." broadcast="true">
977        <events>
978            <trigger>
979                <EventListener event=famer1 />
980            </trigger>
981        </events>
982    </SimpleNotification>
983
984
985    <SimpleNotification message="We will lend you our strongest ship." broadcast="true">
986        <events>
987            <trigger>
988                <EventListener event=famer2 />
989            </trigger>
990        </events>
991    </SimpleNotification>
992
993
994<!-- @Objects: HYDROGEN FARMER & DOCKING -->
995    <SpaceShip
996        team      = 0
997        position  = "-48900,100,0"
998        roll      = 90   yaw=0  pitch=20
999        mass      = 10000
1000        health    = 100000 initialhealth=100000 maxhealth="100000"
1001        name      = "HydroFarmer"
1002        radarname = "Hydrogen Farmer" >
1003      <attached>
1004        <!-- Docking -->
1005        <DistanceTriggerBeacon name="bcnDestroyer" />
1006        <DockingTarget name="destroyer" />
1007
1008        <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=50 />
1009   <!-- <Model mesh="cube.mesh" mass=10 position="-560,0,0" scale3D="115,100,245"  />
1010        <Model mesh="cube.mesh" mass=10 position="290,0,-480" scale3D="115,100,245" yaw=-120 />
1011        <Model mesh="cube.mesh" mass=10 position="290,0,480" scale3D="115,100,245" yaw=-240 />
1012        <Model mesh="cube.mesh" mass=10 position="-280,0,0" scale3D="163,50,50" />
1013        <Model mesh="cube.mesh" mass=10 position="140,0,-240" scale3D="163,50,50"  yaw=-120/>
1014        <Model mesh="cube.mesh" mass=10 position="140,0,240" scale3D="163,50,50" yaw=-240/>
1015        <Model mesh="cube.mesh" mass=10 position="0,530,0" scale3D="172,52,298" />
1016        <Model mesh="cube.mesh" mass=10 position="0,530,0" scale3D="172,52,298" yaw=-120/>
1017        <Model mesh="cube.mesh" mass=10 position="0,530,0" scale3D="172,52,298" yaw=-240/>
1018        <Model mesh="cube.mesh" mass=10 position="0,400,0" scale3D="43,110,26" yaw=-30 />
1019        <Model mesh="cube.mesh" mass=10 position="-200,100,0" scale3D="26,50,43" />
1020        <Model mesh="cube.mesh" mass=10 position="100,100,-173" scale3D="43,50,26" yaw=-30/>
1021        <Model mesh="cube.mesh" mass=10 position="100,100,173" scale3D="43,50,26" yaw=30/>
1022        <Model mesh="cube.mesh" mass=10 position="-100,264,0" scale3D="26,105,43" roll=-49/>
1023        <Model mesh="cube.mesh" mass=10 position="50,264,-87" scale3D="26,105,43" roll=-49 yaw=-120/>
1024        <Model mesh="cube.mesh" mass=10 position="50,264,87" scale3D="26,105,43" roll=-49 yaw=-240/>     -->
1025      </attached>
1026      <collisionShapes>
1027        <BoxCollisionShape  position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes -->
1028        <BoxCollisionShape  position="290,0,-480" halfExtents="115,100,245" yaw=-120 />
1029        <BoxCollisionShape  position="290,0,480" halfExtents="115,100,245" yaw=-240 />
1030        <BoxCollisionShape  position="-280,0,0" halfExtents="163,50,50" /><!-- Three lower connections -->
1031        <BoxCollisionShape  position="140,0,-240" halfExtents="163,50,50" yaw=-120 />
1032        <BoxCollisionShape  position="140,0,240" halfExtents="163,50,50" yaw=-240 />
1033        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" /><!-- Upper Tower -->
1034        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-120 />
1035        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-240 />
1036        <BoxCollisionShape  position="0,400,0" halfExtents="43,110,26" yaw=-30 /><!-- Middle one-->
1037        <BoxCollisionShape  position="-200,100,0" halfExtents="26,50,43" /><!--Three lower legs -->
1038        <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=-30 />
1039        <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=30 />
1040        <BoxCollisionShape  position="-100,264,0" halfExtents="26,105,43" roll=-49 /><!--Three upper legs -->
1041        <BoxCollisionShape  position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 />
1042        <BoxCollisionShape  position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 />
1043      </collisionShapes>
1044    </SpaceShip>
1045
1046    <Dock position="-48900,0,0" roll=90 yaw=180 >
1047        <animations>
1048            <MoveToDockingTarget target="destroyer" />
1049        </animations>
1050        <effects>
1051            <DockToShip target="spaceShip" />
1052        </effects>
1053        <events>
1054            <execute>
1055                <EventListener event="dockMe" />
1056            </execute>
1057            <activity>
1058                <EventListener event=notGameEnd />
1059            </activity>
1060        </events>
1061        <attached>
1062            <DistanceTrigger position="10,-202, -42" distance="800" target="Pawn"
1063                beaconMode="exclude" targetname="bcnDestroyer" name="dockMe"
1064            />
1065        </attached>
1066
1067    </Dock>
1068
1069<!--@Objects: SpaceCruiser as docking target -->
1070    <SpaceShip
1071        template            = "spaceshipspacecruiser"
1072        team                = "0"
1073        position            = "-48900,800,0"
1074        orientation         = "-0.14, 0.68, 0.68, 0.223"
1075        health              = "400"
1076        initialhealth       = "400"
1077        maxhealth           = "500"
1078        shieldhealth        = "80"
1079        initialshieldhealth = "80"
1080        maxshieldhealth     = "120"
1081        shieldabsorption    = "0.8"
1082        reloadrate          = "1"
1083        reloadwaittime      = "1"
1084        name                = "cruiser"
1085        radarname           = "Spacecruiser" >
1086      <attached>
1087        <DockingTarget name="spaceShip" />
1088      </attached>
1089    </SpaceShip>
1090
1091
1092<!-- cruiserKilled: if cuiser is killed & player hasn't taken control of spacecrusier -->
1093          <Trigger name="cruiserKilled" mode="and" stayActive="true">
1094            <EventTrigger  stayActive="true">
1095              <events>
1096                <trigger>
1097                  <EventListener event="cruiser"/>
1098                </trigger>
1099              </events>
1100            </EventTrigger>
1101            <EventTrigger invert=true>
1102              <events>
1103                <trigger>
1104                  <EventListener event="ondock" />
1105                </trigger>
1106              </events>
1107            </EventTrigger>
1108          </Trigger>
1109
1110
1111<!-- triggers when either hydrofarmer or cruiser is killed -->
1112            <Trigger mode=or name="gameEnd">
1113                <EventTrigger activations="1">
1114                  <events>
1115                    <trigger>
1116                      <EventListener event="HydroFarmer" />
1117                    </trigger>
1118                  </events>
1119                </EventTrigger>
1120                <EventTrigger activations="1">
1121                  <events>
1122                    <trigger>
1123                      <EventListener event="cruiserKilled" />
1124                    </trigger>
1125                  </events>
1126                </EventTrigger>
1127            </Trigger>
1128
1129<!-- triggers delayed when either hydrofarmer or cruiser is killed -->
1130            <EventTrigger delay=4 name="earlyEnd">
1131              <events>
1132                <trigger>
1133                  <EventListener event="gameEnd" />
1134                </trigger>
1135              </events>
1136              <events>
1137                <activity>
1138                  <EventListener event="movingpirates2" />
1139                </activity>
1140              </events>
1141            </EventTrigger>
1142
1143
1144    <SimpleNotification message="Oh no! You killed the Hydrogen Farmer!" broadcast="true">
1145        <events>
1146            <trigger>
1147                <EventListener event="HydroFarmer" />
1148            </trigger>
1149        </events>
1150    </SimpleNotification>
1151
1152    <SimpleNotification message="Oh no! You killed the SpaceCruiser!" broadcast="true">
1153        <events>
1154            <trigger>
1155                <EventListener event="cruiserKilled" />
1156            </trigger>
1157        </events>
1158    </SimpleNotification>
1159
1160    <SimpleNotification message="Press (Esc) and restart the mission." broadcast="true">
1161        <events>
1162            <trigger>
1163                <EventListener event="earlyEnd" />
1164            </trigger>
1165        </events>
1166    </SimpleNotification>
1167
1168<!-- hydrogen farmer & docking END -->
1169
1170
1171<!-- @Objects: Pickup - find better place !! -->
1172    <PickupSpawner pickup=hugeshieldpickup position="-48650,700,100" triggerDistance="70" respawnTime="30" maxSpawnedItems="1" />
1173
1174
1175    <DistanceTrigger name="pickup" position="-48650,700,100" target="Pawn" distance=60 stayActive="true" delay=0 />
1176    <SimpleNotification message="This pickup protects your spaceship.">
1177        <events>
1178            <trigger>
1179                <EventListener event=pickup />
1180            </trigger>
1181        </events>
1182    </SimpleNotification>
1183<!-- Pickup-->
1184
1185
1186<!-- @Objects: planet && spaceboundaries  -->
1187    <Planet
1188      position="-44000,0,0"
1189      scale="2500"
1190      collisionType="dynamic"
1191      linearDamping="0.8"
1192      angularDamping="0"
1193      mass="10000000"
1194      pitch="0"
1195      mesh="planets/muunilinst.mesh"
1196      atmosphere="atmosphere1"
1197      rotationaxis="1,0,0"
1198      rotationrate="1.0"
1199      atmospheresize="80.0f"
1200      imagesize="1024.0f"
1201      collisiondamage = "2"
1202      enablecollisiondamage = "false"
1203    >
1204      <!--attached>
1205        <ForceField position="0,0,0" mode="sphere" diameter="10000" velocity="-50" />
1206      </attached-->  <!-- Forcefield kills HYDROGEN FARMER-->
1207      <collisionShapes>
1208        <SphereCollisionShape radius="2500" position="0,0,0" />
1209      </collisionShapes>
1210    </Planet>
1211
1212
1213<!-------------------------------------- The attack --------------------------------------->
1214<!-- TODO:
1215     - update spaceshipTransporter
1216     - bots do friendly fire (is drone function reusable?)
1217-->
1218
1219<!-- Fallback Spawnpoint: on cruiserdeath caused by pirates. Unfortunately unstable behaviour concerning activity. -->
1220    <TeamSpawnPoint team=0 position="2000,1500,-1500" direction="-1,-1,1" spawnclass=SpaceShip pawndesign=spaceshipspacecruiser>
1221        <events>
1222            <activity>
1223                <EventListener event="attack" />
1224            </activity>
1225        </events>
1226    </TeamSpawnPoint>
1227
1228<!-- @Triggers: toHydroFamer <-> first  portal usage
1229                ondock       <-> successfull docking
1230                attack       <-> second portal usage -->
1231
1232    <DistanceTrigger name="attack" position="-1400,-500,800" target="Pawn" distance=100 stayActive="true" mode="and">
1233        <EventTrigger name="ondock" activations="1" stayactive="true" delay=6>
1234          <events>
1235            <trigger>
1236              <EventListener event="dockMe" />
1237            </trigger>
1238          </events>
1239            <Trigger mode=and>
1240              <DistanceTrigger name="toHydroFarmer" position="-47000,-1000,1300" target="Pawn" distance=100 stayActive="true" />
1241              <EventTrigger activations="1" invert="true">
1242                <events>
1243                  <trigger>
1244                    <EventListener event="gameEnd" />
1245                  </trigger>
1246                </events>
1247              </EventTrigger>
1248            </Trigger>
1249        </EventTrigger>
1250        <EventTrigger activations="1" invert="true">
1251          <events>
1252            <trigger>
1253              <EventListener event="earlyEnd" />
1254            </trigger>
1255          </events>
1256        </EventTrigger>
1257    </DistanceTrigger>
1258
1259    <SimpleNotification message="Return before it's too late. Boost with (Space)." broadcast="true">
1260        <events>
1261            <trigger>
1262                <EventListener event=ondock />
1263            </trigger>
1264        </events>
1265    </SimpleNotification>
1266
1267    <SimpleNotification message="Several serious enemies are approaching!">
1268        <events>
1269            <trigger>
1270                <EventListener event=attack />
1271            </trigger>
1272        </events>
1273    </SimpleNotification>
1274
1275
1276<!-- @Objects: 6 pirates, heading towards DuBall, attacking  -->
1277<!-- TODO: re-hide pirates on early end-->
1278<!-- 1 -->
1279    <SpaceShip position="3000,-4000,4000" lookat="-1300,-600,900" name="attacker"visible="true">
1280        <events>
1281            <visibility>
1282                <EventListener event="ondock" />
1283            </visibility>
1284        </events>
1285        <templates>
1286            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
1287        </templates>
1288        <controller>
1289            <WaypointPatrolController alertnessradius=3129 team=1 active=false>
1290                <waypoints>
1291                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
1292                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
1293                </waypoints>
1294                <events>
1295                    <activity>
1296                        <EventListener event="attack" /> <!-- activates enemies-->
1297                     </activity>
1298                </events>
1299            </WaypointPatrolController>
1300        </controller>
1301    </SpaceShip>
1302<!-- 2 -->
1303    <SpaceShip position="3000,-4000,-4000" lookat="-1300,-600,900" name="attacker" visible="true">
1304        <events>
1305            <visibility>
1306                <EventListener event="ondock" />
1307            </visibility>
1308        </events>
1309        <templates>
1310            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
1311        </templates>
1312        <controller>
1313            <WaypointPatrolController alertnessradius=3129 team=1 active=false>
1314                <waypoints>
1315                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
1316                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
1317                </waypoints>
1318                <events>
1319                    <activity>
1320                        <EventListener event="attack" /> <!-- activates enemies-->
1321                     </activity>
1322                </events>
1323            </WaypointPatrolController>
1324        </controller>
1325    </SpaceShip>
1326<!-- 3 -->
1327    <SpaceShip position="-4000,-3000,4000" lookat="-1300,-600,900" name="attacker" visible="true">
1328        <events>
1329            <visibility>
1330                <EventListener event="ondock" />
1331            </visibility>
1332        </events>
1333        <templates>
1334            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
1335        </templates>
1336        <controller>
1337            <WaypointPatrolController alertnessradius=3129 team=1 active=false>
1338                <waypoints>
1339                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
1340                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
1341                </waypoints>
1342                <events>
1343                    <activity>
1344                        <EventListener event="attack" /> <!-- activates enemies-->
1345                     </activity>
1346                </events>
1347            </WaypointPatrolController>
1348        </controller>
1349    </SpaceShip>
1350<!-- 4 -->
1351    <SpaceShip position="-3000,-3000,-5000" lookat="-1300,-600,900" name="attacker" visible="true">
1352        <events>
1353            <visibility>
1354                <EventListener event="ondock" />
1355            </visibility>
1356        </events>
1357        <templates>
1358            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
1359        </templates>
1360        <controller>
1361            <WaypointPatrolController alertnessradius=3129 team=1 active=false>
1362                <waypoints>
1363                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
1364                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
1365                </waypoints>
1366                <events>
1367                    <activity>
1368                        <EventListener event="attack" /> <!-- activates enemies-->
1369                     </activity>
1370                </events>
1371            </WaypointPatrolController>
1372        </controller>
1373    </SpaceShip>
1374<!-- 5 -->
1375    <SpaceShip position="4000,4000,3000" lookat="-1300,-600,900" name="attacker"visible="true">
1376        <events>
1377            <visibility>
1378                <EventListener event="ondock" />
1379            </visibility>
1380        </events>
1381        <templates>
1382            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
1383        </templates>
1384        <controller>
1385            <WaypointPatrolController alertnessradius=3129 team=1 active=false>
1386                <waypoints>
1387                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
1388                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
1389                </waypoints>
1390                <events>
1391                    <activity>
1392                        <EventListener event="attack" /> <!-- activates enemies-->
1393                     </activity>
1394                </events>
1395            </WaypointPatrolController>
1396        </controller>
1397    </SpaceShip>
1398<!-- 6 -->
1399    <SpaceShip position="2000,-4000,5000" lookat="-1300,-600,900" name="attacker" visible="true">
1400        <events>
1401            <visibility>
1402                <EventListener event="ondock" />
1403            </visibility>
1404        </events>
1405        <templates>
1406            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
1407        </templates>
1408        <controller>
1409            <WaypointPatrolController alertnessradius=3129 team=1 active=false>
1410                <waypoints>
1411                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
1412                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
1413                </waypoints>
1414                <events>
1415                    <activity>
1416                        <EventListener event="attack" /> <!-- activates enemies-->
1417                     </activity>
1418                </events>
1419            </WaypointPatrolController>
1420        </controller>
1421    </SpaceShip>
1422
1423
1424<!-- @Triggers: attacktriggerX <-> X enemies destroyed , X is an element of [1,6] -->
1425    <EventTrigger name="attacktrigger6" activations="1" stayactive="true">
1426      <events>
1427        <trigger>
1428          <EventListener event="attacker" />
1429        </trigger>
1430      </events>
1431      <EventTrigger name="attacktrigger5" activations="1" stayactive="true" delay=0.1>
1432        <events>
1433          <trigger>
1434            <EventListener event="attacker" />
1435          </trigger>
1436        </events>
1437        <EventTrigger name="attacktrigger4" activations="1" stayactive="true" delay=0.1>
1438          <events>
1439            <trigger>
1440              <EventListener event="attacker" />
1441            </trigger>
1442          </events>
1443          <EventTrigger name="attacktrigger3" activations="1" stayactive="true" delay=0.1>
1444            <events>
1445              <trigger>
1446                <EventListener event="attacker" />
1447              </trigger>
1448            </events>
1449            <EventTrigger name="attacktrigger2" activations="1" stayactive="true" delay=0.1>
1450              <events>
1451                <trigger>
1452                  <EventListener event="attacker" />
1453                </trigger>
1454              </events>
1455              <EventTrigger name="attacktrigger1" activations="1" stayactive="true" delay=0.1>
1456                <events>
1457                  <trigger>
1458                    <EventListener event="attacker" />
1459                  </trigger>
1460                </events>
1461              </EventTrigger>
1462            </EventTrigger>
1463          </EventTrigger>
1464        </EventTrigger>
1465      </EventTrigger>
1466    </EventTrigger>
1467
1468
1469    <SimpleNotification message="5 enemies left!" broadcast="true">
1470      <events>
1471        <trigger>
1472          <EventListener event="attacktrigger1" />
1473        </trigger>
1474      </events>
1475    </SimpleNotification>
1476
1477    <SimpleNotification message="4 enemies left!" broadcast="true">
1478      <events>
1479        <trigger>
1480          <EventListener event="attacktrigger2" />
1481        </trigger>
1482      </events>
1483    </SimpleNotification>
1484
1485    <SimpleNotification message="3 enemies left!" broadcast="true">
1486      <events>
1487        <trigger>
1488          <EventListener event="attacktrigger3" />
1489        </trigger>
1490      </events>
1491    </SimpleNotification>
1492
1493    <SimpleNotification message="2 enemies left!" broadcast="true">
1494      <events>
1495        <trigger>
1496          <EventListener event="attacktrigger4" />
1497        </trigger>
1498      </events>
1499    </SimpleNotification>
1500
1501    <SimpleNotification message="One enemy left!" broadcast="true">
1502      <events>
1503        <trigger>
1504          <EventListener event="attacktrigger5" />
1505        </trigger>
1506      </events>
1507    </SimpleNotification>
1508
1509    <SimpleNotification message="Well done. You finished this tutorial." broadcast="true">
1510      <events>
1511        <trigger>
1512          <EventListener event="attacktrigger6" />
1513        </trigger>
1514      </events>
1515    </SimpleNotification>
1516
1517<!-- @Triggers: postAttack <-> delayed attacktrigger6 -->
1518    <EventTrigger name="postAttack1" activations="1" stayactive="true" delay=4.1>
1519      <events>
1520        <trigger>
1521          <EventListener event="attacktrigger6" />
1522        </trigger>
1523      </events>
1524    </EventTrigger>
1525
1526    <EventTrigger name="postAttack2" activations="1" stayactive="true" delay=8.2>
1527      <events>
1528        <trigger>
1529          <EventListener event="attacktrigger6" />
1530        </trigger>
1531      </events>
1532    </EventTrigger>
1533
1534    <SimpleNotification message="Either quit by pressing (Esc) or ..." broadcast="true">
1535      <events>
1536        <trigger>
1537          <EventListener event="postAttack1" />
1538        </trigger>
1539      </events>
1540    </SimpleNotification>
1541
1542    <SimpleNotification message="... stay here to learn some tricks." broadcast="true">
1543      <events>
1544        <trigger>
1545          <EventListener event="postAttack2" />
1546        </trigger>
1547      </events>
1548    </SimpleNotification>
1549
1550<!-------------------------------------- |Bonus Part| --------------------------------------->
1551<!-- @Triggers: "bonusX" <->  delayed "attacktrigger6" -->
1552    <EventTrigger name="bonus1" activations="1" stayactive="true" delay=12.3>
1553      <events>
1554        <trigger>
1555          <EventListener event="attacktrigger6" />
1556        </trigger>
1557      </events>
1558    </EventTrigger>
1559    <EventTrigger name="bonus2" activations="1" stayactive="true" delay=16.4>
1560      <events>
1561        <trigger>
1562          <EventListener event="attacktrigger6" />
1563        </trigger>
1564      </events>
1565    </EventTrigger>
1566    <EventTrigger name="bonus3" activations="1" stayactive="true" delay=22>
1567      <events>
1568        <trigger>
1569          <EventListener event="attacktrigger6" />
1570        </trigger>
1571      </events>
1572    </EventTrigger>
1573    <EventTrigger name="bonus4" activations="1" stayactive="true" delay=28.1>
1574      <events>
1575        <trigger>
1576          <EventListener event="attacktrigger6" />
1577        </trigger>
1578      </events>
1579    </EventTrigger>
1580    <EventTrigger name="bonus5" activations="1" stayactive="true" delay=32.3>
1581      <events>
1582        <trigger>
1583          <EventListener event="attacktrigger6" />
1584        </trigger>
1585      </events>
1586    </EventTrigger>
1587    <EventTrigger name="bonus6" activations="1" stayactive="true" delay=36.5>
1588      <events>
1589        <trigger>
1590          <EventListener event="attacktrigger6" />
1591        </trigger>
1592      </events>
1593    </EventTrigger>
1594    <EventTrigger name="bonus7" activations="1" stayactive="true" delay=4.1>
1595      <events>
1596        <trigger>
1597          <EventListener event="bonus6" />
1598        </trigger>
1599      </events>
1600    </EventTrigger>
1601
1602
1603
1604    <SimpleNotification message="Rotate your ship. Press (Q) or (E). "  broadcast="true">
1605        <events>
1606            <trigger>
1607                <EventListener event=bonus1 />
1608            </trigger>
1609        </events>
1610    </SimpleNotification>
1611
1612    <SimpleNotification message="Switch the camera's position. Press (C). "  broadcast="true">
1613        <events>
1614            <trigger>
1615                <EventListener event=bonus2 />
1616            </trigger>
1617        </events>
1618    </SimpleNotification>
1619
1620    <SimpleNotification message="360° view: press (Ctrl) + use the mouse "  broadcast="true">
1621        <events>
1622            <trigger>
1623                <EventListener event=bonus3 />
1624            </trigger>
1625        </events>
1626    </SimpleNotification>
1627
1628    <SimpleNotification message="Have a look at the main menu's settings."  broadcast="true">
1629        <events>
1630            <trigger>
1631                <EventListener event=bonus4 />
1632            </trigger>
1633        </events>
1634    </SimpleNotification>
1635
1636    <SimpleNotification message="E.g: Settings > Miscellaneous > Nr. of bots"  broadcast="true">
1637        <events>
1638            <trigger>
1639                <EventListener event=bonus5 />
1640            </trigger>
1641        </events>
1642    </SimpleNotification>
1643
1644    <SimpleNotification message="You successfully finished Mission One!"  broadcast="true">
1645        <events>
1646            <trigger>
1647                <EventListener event=bonus6 />
1648            </trigger>
1649        </events>
1650    </SimpleNotification>
1651
1652    <SimpleNotification message="Press (Esc) and return to the main menu."  broadcast="true">
1653        <events>
1654            <trigger>
1655                <EventListener event=bonus7 />
1656            </trigger>
1657        </events>
1658    </SimpleNotification>
1659
1660<!-- @Triggers: HACK. The attacktrigger6 Event is created, but does not trigger the Script.
1661(WTF?) TODO: looks like a BUG
1662Thus a distanceTrigger is created, that gets enabled, when the inner trigger gets activated.
1663Due to the large radius it is likely that it actually gets triggered.
1664-->
1665
1666  <DistanceTrigger name="testDistanceTrigger" position="0,0,0" distance=10000 target="SpaceShip" stayActive="true" delay=37.0>
1667    <EventTrigger name="testEventTrigger" activations="1" stayactive="true" delay=0.1>
1668      <events>
1669        <trigger>
1670          <EventListener event="attacktrigger6" />
1671        </trigger>
1672      </events>
1673    </EventTrigger>
1674  </DistanceTrigger>
1675
1676    <Script code="Mission endMission true" onLoad="false">
1677        <events>
1678            <trigger>
1679                <EventListener event="testDistanceTrigger" />
1680            </trigger>
1681        </events>
1682    </Script>
1683
1684    <Script code="Mission endMission false" onLoad="false">
1685        <events>
1686            <trigger>
1687                <EventListener event="gameEnd" />
1688            </trigger>
1689        </events>
1690    </Script>
1691
1692
1693
1694
1695
1696
1697    <!--Script code="addBots 3" onLoad="false">
1698        <events>
1699            <trigger>
1700                <EventListener event=bonus6 />
1701            </trigger>
1702        </events>
1703    </Script>
1704
1705    <Script code="artificialcontroller setbotlevel 0.1" onLoad="false">
1706        <events>
1707            <trigger>
1708                <EventListener event=bonus6 />
1709            </trigger>
1710        </events>
1711    </Script-->
1712    <!-- Script code="artificialcontroller setbotlevel 0.1" /-->
1713  </Scene>
1714</Level>
1715
1716<!-- TODO:
1717- Story & more precise Questmessages; more quest hints; fail-quest;
1718- Colouring: Show who is friend or foe via the colour
1719- Waypoints: show the player the way
1720- Foolproof text messages (e.g. verspätete Nachrichten unterdrücken ~done )
1721- End Tutorial, if either the Hydrogen Farmer or the SpaceCruiser gets destroyed. (~done)
1722 -->
Note: See TracBrowser for help on using the repository browser.