Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/gamecontent/data/levels/missionOne.oxw @ 9116

Last change on this file since 9116 was 8951, checked in by jo, 13 years ago

Removing interface - no actual need for it, since only two classes are necessary to have a teamnumber. Prepared tutorial level for new HUD feature.

File size: 60.3 KB
Line 
1<LevelInfo
2 name = "Mission One"
3 description = "First guided steps in the orxonoxian universe."
4 tags = "singleplayer"
5/>
6
7<?lua
8  include("stats.oxo")
9  include("HUDTemplates3.oxo")
10  include("templates/lodInformation.oxt")
11  include("templates/spaceshipAssff.oxt")
12  include("templates/spaceshipPirate.oxt")
13  include("templates/spaceshipSpacecruiser.oxt")
14  include("templates/spaceshipTransporter.oxt")
15?>
16
17<?lua
18include("templates/pickupRepresentationTemplates.oxt")
19?>
20
21<Level
22 name         = "Mission One"
23 description  = "How to steer a spaceship."
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 team=1 health=30 position="0,0,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Box 1" >
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    </Pawn>
525
526    <Pawn team=1 health=30 position="0,100,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Box 2">
527        <events>
528          <visibility>
529            <EventListener event="flying4" />
530          </visibility>
531        </events>
532        <attached>
533           <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
534        </attached>
535        <collisionShapes>
536            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
537        </collisionShapes>
538    </Pawn>
539
540    <Pawn health=30 position="0,200,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box team=1 RVName = "Box 3">
541        <events>
542          <visibility>
543            <EventListener event="flying4" />
544          </visibility>
545        </events>
546        <attached>
547           <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
548        </attached>
549        <collisionShapes>
550            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
551        </collisionShapes>
552    </Pawn>
553
554    <Pawn health=30 position="0,300,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box team=1 RVName = "Box 4">
555        <events>
556          <visibility>
557            <EventListener event="flying4" />
558          </visibility>
559        </events>
560        <attached>
561            <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
562        </attached>
563        <collisionShapes>
564           <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
565        </collisionShapes>
566    </Pawn>
567
568<!-- @Triggers: boxtrigger1 <-> one   box   destroyed
569                boxtrigger2 <-> two   boxes destroyed
570                boxtrigger3 <-> three boxes destroyed
571                boxtrigger4 <-> four  boxes destroyed  -->
572    <EventTrigger name="boxtrigger4" activations="1" stayactive="true" delay=0.1>
573      <events>
574        <trigger>
575          <EventListener event="box" />
576        </trigger>
577      </events>
578      <EventTrigger name="boxtrigger3" activations="1" stayactive="true" delay=0.1>
579        <events>
580          <trigger>
581            <EventListener event="box" />
582          </trigger>
583        </events>
584        <EventTrigger name="boxtrigger2" activations="1" stayactive="true" delay=0.1>
585          <events>
586            <trigger>
587              <EventListener event="box" />
588            </trigger>
589          </events>
590          <EventTrigger name="boxtrigger1" activations="1" stayactive="true" delay=0.1>
591            <events>
592              <trigger>
593                <EventListener event="box" />
594              </trigger>
595            </events>
596          </EventTrigger>
597        </EventTrigger>
598      </EventTrigger>
599    </EventTrigger>
600
601
602  <SimpleNotification message="Right click on the next target." broadcast="true">
603        <events>
604            <trigger>
605                <EventListener event="boxtrigger1" />
606            </trigger>
607        </events>
608    </SimpleNotification>
609
610  <SimpleNotification message="Middle click on the next target." broadcast="true">
611        <events>
612            <trigger>
613                <EventListener event="boxtrigger2" />
614            </trigger>
615        </events>
616    </SimpleNotification>
617
618  <SimpleNotification message="Aim at the last target and press (T)." broadcast="true">
619        <events>
620            <trigger>
621                <EventListener event="boxtrigger3" />
622            </trigger>
623        </events>
624    </SimpleNotification>
625
626  <SimpleNotification message="Try to hit the pirates while you are flying." broadcast="true">
627        <events>
628            <trigger>
629                <EventListener event="boxtrigger4" />
630            </trigger>
631        </events>
632    </SimpleNotification>
633
634
635<!--------------------------------------PART TWO: Moving targets --------------------------------------->
636
637<!-- @Objects: 2 pirates moving in squares, nonlethal -->
638                <SpaceShip position="0,2000,200" lookat="0,0,0" name="movingtarget" RVName="Pirate">
639                            <events>
640                                <visibility>
641                                    <EventListener event="boxtrigger4" />
642                                </visibility>
643                            </events>
644                    <templates>
645                      <Template link=spaceshippirate />
646                    </templates>
647                    <controller>
648                      <WaypointController team=1>
649                         <waypoints>
650                          <Model mesh="cube.mesh" scale=8 position="  0,1700,-200" />
651                          <Model mesh="cube.mesh" scale=8 position="  0,1700,-700" />
652                          <Model mesh="cube.mesh" scale=8 position="500,1700,-700" />
653                          <Model mesh="cube.mesh" scale=8 position="500,1700,-200" />
654                       </waypoints>
655                    </WaypointController>
656                  </controller>
657                </SpaceShip>
658
659                <SpaceShip position="0,2000,400" lookat="0,0,0" name="movingtarget" RVName="Pirate">
660                            <events>
661                                <visibility>
662                                    <EventListener event="boxtrigger4" />
663                                </visibility>
664                            </events>
665                  <templates>
666                    <Template link=spaceshippirate />
667                  </templates>
668                  <controller>
669                    <WaypointController team=1>
670                      <waypoints>
671                        <Model mesh="cube.mesh" scale=8 position="  0,2400,1000" />
672                        <Model mesh="cube.mesh" scale=8 position="  0,2400, 500" />
673                        <Model mesh="cube.mesh" scale=8 position="500,2400, 500" />
674                        <Model mesh="cube.mesh" scale=8 position="500,2400,1000" />
675                      </waypoints>
676                    </WaypointController>
677                  </controller>
678                </SpaceShip>
679
680<!-- @Triggers: movingpirates1 <-> one  pirate  dead
681                movingpirates2 <-> both pirates dead  -->
682    <EventTrigger name="movingpirates2" activations="1" stayactive="true" delay=0.1>
683      <events>
684        <trigger>
685          <EventListener event="movingtarget" />
686        </trigger>
687      </events>
688      <EventTrigger name="movingpirates1" activations="1" stayactive="true" delay=0.1>
689        <events>
690          <trigger>
691            <EventListener event="movingtarget" />
692          </trigger>
693        </events>
694      </EventTrigger>
695    </EventTrigger>
696
697
698    <SimpleNotification message="Now get the other one."  broadcast="true">
699        <events>
700            <trigger>
701                <EventListener event="movingpirates1" />
702            </trigger>
703        </events>
704    </SimpleNotification>
705
706    <SimpleNotification message="Fly towards the space station (grey dot)."  broadcast="true">
707        <events>
708            <trigger>
709                <EventListener event="movingpirates2" />
710            </trigger>
711        </events>
712    </SimpleNotification>
713
714
715
716<!--------------------------------------PART THREE: the space station --------------------------------------->
717    <DistanceTrigger name="duball1" position="-1000,-300,700" target="Pawn" distance=700 stayActive="true" delay=1 >
718      <events>
719        <activity>
720          <EventListener event="movingpirates2" />
721        </activity>
722      </events>
723    </DistanceTrigger>
724
725    <Trigger name="duball2" mode="and" stayActive="true">
726        <EventTrigger activations="1" stayactive="true" delay=4 >
727           <events>
728              <trigger>
729                 <EventListener event="duball1" />
730              </trigger>
731           </events>
732        </EventTrigger>
733        <EventTrigger activations="1" invert="true">
734          <events>
735            <trigger>
736              <EventListener event="toHydroFarmer" />
737            </trigger>
738          </events>
739        </EventTrigger>
740    </Trigger>
741
742    <Trigger name="duball3" mode="and" stayActive="true">
743        <EventTrigger activations="1" stayactive="true" delay=4 >
744           <events>
745              <trigger>
746                 <EventListener event="duball2" />
747              </trigger>
748           </events>
749        </EventTrigger>
750        <EventTrigger activations="1" invert="true">
751          <events>
752            <trigger>
753              <EventListener event="toHydroFarmer" />
754            </trigger>
755          </events>
756        </EventTrigger>
757    </Trigger>
758
759
760    <SimpleNotification message="Welcome to the Duball Space Station!">
761        <events>
762            <trigger>
763                <EventListener event=duball1 />
764            </trigger>
765        </events>
766    </SimpleNotification>
767
768    <SimpleNotification message="Warning: Something big is coming." broadcast="true">
769        <events>
770            <trigger>
771                <EventListener event=duball2 />
772            </trigger>
773        </events>
774    </SimpleNotification>
775
776    <SimpleNotification message="Use the portals to get help. (grey dot)" broadcast="true">
777        <events>
778            <trigger>
779                <EventListener event=duball3 />
780            </trigger>
781        </events>
782    </SimpleNotification>
783
784
785<!-- @Objects: DuBall Space Station, (no pawn!) -->
786    <StaticEntity position="-1000,-300,700" collisionType=static>
787      <attached>
788        <Model scale=13 mesh="DuBall1.mesh" position = "-100,0,0"/>
789        <Model scale=13 mesh="DuBall2.mesh" position = "100,0,0"/>
790        <Billboard scale=7 material="Examples/Flare" colour="0.5,0.5,0.5" position = "-100,0,0"/>
791        <Billboard scale=7 material="Examples/Flare" colour="0.5,0.5,0.5" position = "100,0,0"/>
792      </attached>
793      <collisionShapes>
794        <SphereCollisionShape radius="80"            position = "-100,0,0" />
795        <SphereCollisionShape radius="120"           position = "100,0,0" />
796        <BoxCollisionShape    halfExtents="90,25,45" position = "-155,0,40" />
797      </collisionShapes>
798    </StaticEntity>
799
800
801<!-- @Objects: PORTAL: from DuBall to HydroHarvester  -->
802    <Template name=PortalDefault>
803        <PortalEndPoint>
804            <attached>
805                <Billboard material="Portals/Default" />
806            </attached>
807        </PortalEndPoint>
808    </Template>
809
810    <PortalEndPoint position="-1400,-500,800" id="1" distance="50" target="MobileEntity" design="PortalDefault">
811          <events>
812            <activity>
813              <Trigger mode="or" activations="2">
814                <Trigger mode="and" activations="1">
815                  <EventTrigger>
816                    <events>
817                      <trigger>
818                        <EventListener event="movingpirates2" />
819                      </trigger>
820                    </events>
821                  </EventTrigger>
822                  <EventTrigger invert=true>
823                    <events>
824                      <trigger>
825                        <EventListener event="toHydroFarmer" />
826                      </trigger>
827                    </events>
828                  </EventTrigger>
829                </Trigger>
830                <Trigger mode="and" activations="1">
831                  <EventTrigger>
832                    <events>
833                      <trigger>
834                        <EventListener event="ondock" />
835                      </trigger>
836                    </events>
837                  </EventTrigger>
838                  <EventTrigger invert=true>
839                    <events>
840                      <trigger>
841                        <EventListener event="attack" />
842                      </trigger>
843                    </events>
844                  </EventTrigger>
845                </Trigger>
846                <EventTrigger>
847                  <events>
848                    <trigger>
849                      <EventListener event="HydroFarmer" />
850                    </trigger>
851                  </events>
852                </EventTrigger>
853              </Trigger>
854            </activity>
855          </events>
856    </PortalEndPoint>
857
858    <PortalEndPoint position="-47000,-1000,1300" id="2" distance="70" target="MobileEntity" design="PortalDefault">
859          <events>
860            <activity>
861              <Trigger mode="or" activations="3">
862                <Trigger mode="and" activations="1">
863                  <EventTrigger>
864                    <events>
865                      <trigger>
866                        <EventListener event="movingpirates2" />
867                      </trigger>
868                    </events>
869                  </EventTrigger>
870                  <EventTrigger invert=true>
871                    <events>
872                      <trigger>
873                        <EventListener event="toHydroFarmer" />
874                      </trigger>
875                    </events>
876                  </EventTrigger>
877                </Trigger>
878                <Trigger mode="and" activations="1">
879                  <EventTrigger>
880                    <events>
881                      <trigger>
882                        <EventListener event="ondock" />
883                      </trigger>
884                    </events>
885                  </EventTrigger>
886                  <EventTrigger invert=true>
887                    <events>
888                      <trigger>
889                        <EventListener event="attack" />
890                      </trigger>
891                    </events>
892                  </EventTrigger>
893                </Trigger>
894                <EventTrigger>
895                  <events>
896                    <trigger>
897                      <EventListener event="HydroFarmer" />
898                    </trigger>
899                  </events>
900                </EventTrigger>
901              </Trigger>
902            </activity>
903          </events>
904    </PortalEndPoint>
905    <PortalLink fromID="1" toID="2" />
906    <PortalLink fromID="2" toID="1" />
907<!-- ????????????????????????????????????????????????????? why does this NOT work ??
908                <Trigger mode="and" activations="1">
909                  <EventTrigger>
910                    <events>
911                      <trigger>
912                        <EventListener event="HydroFarmer" />
913                      </trigger>
914                    </events>
915                  </EventTrigger>
916                  <EventTrigger invert=true>
917                    <events>
918                      <trigger>
919                        <EventListener event="attack" />
920                      </trigger>
921                    </events>
922                  </EventTrigger>
923                </Trigger>
924-->
925<!-- PORTALS END-->
926
927
928    <SimpleNotification message="Dock to the Hydrogen Farmer." broadcast="true">
929        <events>
930            <trigger>
931                <EventListener event=toHydroFarmer />
932            </trigger>
933        </events>
934    </SimpleNotification>
935
936<!-------------------------------------- PART FOUR : Get Help --------------------------------------->
937
938    <Trigger name="famer1" mode="and" stayActive="true">
939        <DistanceTrigger position="-48200,100,0" target="Pawn" distance=650 stayActive="true" delay=0 />
940        <EventTrigger name="notGameEnd" activations="1" invert="true">
941          <events>
942            <trigger>
943              <EventListener event="gameEnd" />
944            </trigger>
945          </events>
946        </EventTrigger>
947    </Trigger>
948
949    <Trigger name="famer2" mode="and" stayActive="true">
950        <DistanceTrigger position="-48200,100,0" target="Pawn" distance=650 stayActive="true" delay=4 />
951        <EventTrigger activations="1" invert="true">
952          <events>
953            <trigger>
954              <EventListener event="gameEnd" />
955            </trigger>
956          </events>
957        </EventTrigger>
958    </Trigger>
959
960    <SimpleNotification message="We just received a message from DuBall." broadcast="true">
961        <events>
962            <trigger>
963                <EventListener event=famer1 />
964            </trigger>
965        </events>
966    </SimpleNotification>
967
968
969    <SimpleNotification message="We will lend you our strongest ship." broadcast="true">
970        <events>
971            <trigger>
972                <EventListener event=famer2 />
973            </trigger>
974        </events>
975    </SimpleNotification>
976
977
978<!-- @Objects: HYDROGEN FARMER & DOCKING -->
979    <SpaceShip
980        team     = 0
981        position = "-48900,100,0"
982        roll     = 90   yaw=0  pitch=20
983        mass     = 10000
984        health   = 100000 initialhealth=100000 maxhealth="100000"
985        name     = "HydroFarmer"
986        RVName   = "Hydrogen Farmer" >
987      <attached>
988        <!-- Docking -->
989        <DistanceTriggerBeacon name="bcnDestroyer" />
990        <DockingTarget name="destroyer" />
991
992        <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=50 />
993   <!-- <Model mesh="cube.mesh" mass=10 position="-560,0,0" scale3D="115,100,245"  />
994        <Model mesh="cube.mesh" mass=10 position="290,0,-480" scale3D="115,100,245" yaw=-120 />
995        <Model mesh="cube.mesh" mass=10 position="290,0,480" scale3D="115,100,245" yaw=-240 />
996        <Model mesh="cube.mesh" mass=10 position="-280,0,0" scale3D="163,50,50" />
997        <Model mesh="cube.mesh" mass=10 position="140,0,-240" scale3D="163,50,50"  yaw=-120/>
998        <Model mesh="cube.mesh" mass=10 position="140,0,240" scale3D="163,50,50" yaw=-240/>
999        <Model mesh="cube.mesh" mass=10 position="0,530,0" scale3D="172,52,298" />
1000        <Model mesh="cube.mesh" mass=10 position="0,530,0" scale3D="172,52,298" yaw=-120/>
1001        <Model mesh="cube.mesh" mass=10 position="0,530,0" scale3D="172,52,298" yaw=-240/>
1002        <Model mesh="cube.mesh" mass=10 position="0,400,0" scale3D="43,110,26" yaw=-30 />
1003        <Model mesh="cube.mesh" mass=10 position="-200,100,0" scale3D="26,50,43" />
1004        <Model mesh="cube.mesh" mass=10 position="100,100,-173" scale3D="43,50,26" yaw=-30/>
1005        <Model mesh="cube.mesh" mass=10 position="100,100,173" scale3D="43,50,26" yaw=30/>
1006        <Model mesh="cube.mesh" mass=10 position="-100,264,0" scale3D="26,105,43" roll=-49/>
1007        <Model mesh="cube.mesh" mass=10 position="50,264,-87" scale3D="26,105,43" roll=-49 yaw=-120/>
1008        <Model mesh="cube.mesh" mass=10 position="50,264,87" scale3D="26,105,43" roll=-49 yaw=-240/>     -->
1009      </attached>
1010      <collisionShapes>
1011        <BoxCollisionShape  position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes -->
1012        <BoxCollisionShape  position="290,0,-480" halfExtents="115,100,245" yaw=-120 />
1013        <BoxCollisionShape  position="290,0,480" halfExtents="115,100,245" yaw=-240 />
1014        <BoxCollisionShape  position="-280,0,0" halfExtents="163,50,50" /><!-- Three lower connections -->
1015        <BoxCollisionShape  position="140,0,-240" halfExtents="163,50,50" yaw=-120 />
1016        <BoxCollisionShape  position="140,0,240" halfExtents="163,50,50" yaw=-240 />
1017        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" /><!-- Upper Tower -->
1018        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-120 />
1019        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-240 />
1020        <BoxCollisionShape  position="0,400,0" halfExtents="43,110,26" yaw=-30 /><!-- Middle one-->
1021        <BoxCollisionShape  position="-200,100,0" halfExtents="26,50,43" /><!--Three lower legs -->
1022        <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=-30 />
1023        <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=30 />
1024        <BoxCollisionShape  position="-100,264,0" halfExtents="26,105,43" roll=-49 /><!--Three upper legs -->
1025        <BoxCollisionShape  position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 />
1026        <BoxCollisionShape  position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 />
1027      </collisionShapes>
1028    </SpaceShip>
1029
1030    <Dock position="-48900,0,0" roll=90 yaw=180 >
1031        <animations>
1032            <MoveToDockingTarget target="destroyer" />
1033        </animations>
1034        <effects>
1035            <DockToShip target="spaceShip" />
1036        </effects>
1037        <events>
1038            <execute>
1039                <EventListener event="dockMe" />
1040            </execute>
1041            <activity>
1042                <EventListener event=notGameEnd />
1043            </activity>
1044        </events>
1045        <attached>
1046            <DistanceTrigger position="10,-202, -42" distance="800" target="Pawn"
1047                beaconMode="exclude" targetname="bcnDestroyer" name="dockMe"
1048            />
1049        </attached>
1050
1051    </Dock>
1052
1053<!--@Objects: SpaceCruiser as docking target -->
1054    <SpaceShip
1055        template            = "spaceshipspacecruiser"
1056        team                = "0"
1057        position            = "-48900,800,0"
1058        orientation         = "-0.14, 0.68, 0.68, 0.223"
1059        health              = "400"
1060        initialhealth       = "400"
1061        maxhealth           = "500"
1062        shieldhealth        = "80"
1063        initialshieldhealth = "80"
1064        maxshieldhealth     = "120"
1065        shieldabsorption    = "0.8"
1066        reloadrate          = "1"
1067        reloadwaittime      = "1"
1068        name                = "cruiser"
1069        RVName              = "Spacecruiser" >
1070      <attached>
1071        <DockingTarget name="spaceShip" />
1072      </attached>
1073    </SpaceShip>
1074
1075
1076<!-- cruiserKilled: if cuiser is killed & player hasn't taken control of spacecrusier -->
1077          <Trigger name="cruiserKilled" mode="and" stayActive="true">
1078            <EventTrigger  stayActive="true">
1079              <events>
1080                <trigger>
1081                  <EventListener event="cruiser"/>
1082                </trigger>
1083              </events>
1084            </EventTrigger>
1085            <EventTrigger invert=true>
1086              <events>
1087                <trigger>
1088                  <EventListener event="ondock" />
1089                </trigger>
1090              </events>
1091            </EventTrigger>
1092          </Trigger>
1093
1094
1095<!-- triggers when either hydrofarmer or cruiser is killed -->
1096            <Trigger mode=or name="gameEnd">
1097                <EventTrigger activations="1">
1098                  <events>
1099                    <trigger>
1100                      <EventListener event="HydroFarmer" />
1101                    </trigger>
1102                  </events>
1103                </EventTrigger>
1104                <EventTrigger activations="1">
1105                  <events>
1106                    <trigger>
1107                      <EventListener event="cruiserKilled" />
1108                    </trigger>
1109                  </events>
1110                </EventTrigger>
1111            </Trigger>
1112
1113<!-- triggers delayed when either hydrofarmer or cruiser is killed -->
1114            <EventTrigger delay=4 name="earlyEnd">
1115              <events>
1116                <trigger>
1117                  <EventListener event="gameEnd" />
1118                </trigger>
1119              </events>
1120              <events>
1121                <activity>
1122                  <EventListener event="movingpirates2" />
1123                </activity>
1124              </events>
1125            </EventTrigger>
1126
1127
1128    <SimpleNotification message="Oh no! You killed the Hydrogen Farmer!" broadcast="true">
1129        <events>
1130            <trigger>
1131                <EventListener event="HydroFarmer" />
1132            </trigger>
1133        </events>
1134    </SimpleNotification>
1135
1136    <SimpleNotification message="Oh no! You killed the SpaceCruiser!" broadcast="true">
1137        <events>
1138            <trigger>
1139                <EventListener event="cruiserKilled" />
1140            </trigger>
1141        </events>
1142    </SimpleNotification>
1143
1144    <SimpleNotification message="Press (Esc) and restart the mission." broadcast="true">
1145        <events>
1146            <trigger>
1147                <EventListener event="earlyEnd" />
1148            </trigger>
1149        </events>
1150    </SimpleNotification>
1151
1152<!-- hydrogen farmer & docking END -->
1153
1154
1155<!-- @Objects: Pickup - find better place !! -->
1156    <PickupSpawner position="-48650,700,100" triggerDistance="70" respawnTime="30" maxSpawnedItems="1">
1157      <pickup>
1158        <ShieldPickup template=hugeshieldpickup />
1159      </pickup>
1160    </PickupSpawner>
1161
1162
1163    <DistanceTrigger name="pickup" position="-48650,700,100" target="Pawn" distance=60 stayActive="true" delay=0 />
1164    <SimpleNotification message="This pickup protects your spaceship.">
1165        <events>
1166            <trigger>
1167                <EventListener event=pickup />
1168            </trigger>
1169        </events>
1170    </SimpleNotification>
1171<!-- Pickup-->
1172
1173
1174<!-- @Objects: planet && spaceboundaries  -->
1175    <Planet
1176      position="-44000,0,0"
1177      scale="2500"
1178      collisionType="dynamic"
1179      linearDamping="0.8"
1180      angularDamping="0"
1181      mass="10000000"
1182      pitch="0"
1183      mesh="planets/muunilinst.mesh"
1184      atmosphere="atmosphere1"
1185      rotationaxis="1,0,0"
1186      rotationrate="1.0"
1187      atmospheresize="80.0f"
1188      imagesize="1024.0f"
1189      collisiondamage = "2"
1190      enablecollisiondamage = "false"
1191    >
1192      <!--attached>
1193        <ForceField position="0,0,0" mode="sphere" diameter="10000" velocity="-50" />
1194      </attached-->  <!-- Forcefield kills HYDROGEN FARMER-->
1195      <collisionShapes>
1196        <SphereCollisionShape radius="2500" position="0,0,0" />
1197      </collisionShapes>
1198    </Planet>
1199
1200
1201<!-------------------------------------- The attack --------------------------------------->
1202<!-- TODO:
1203     - update spaceshipTransporter
1204     - bots do friendly fire (is drone function reusable?)
1205-->
1206
1207<!-- Fallback Spawnpoint: on cruiserdeath caused by pirates. Unfortunately unstable behaviour concerning activity. -->
1208    <TeamSpawnPoint team=0 position="2000,1500,-1500" direction="-1,-1,1" spawnclass=SpaceShip pawndesign=spaceshipspacecruiser>
1209        <events>
1210            <activity>
1211                <EventListener event="attack" />
1212            </activity>
1213        </events>
1214    </TeamSpawnPoint>
1215
1216<!-- @Triggers: toHydroFamer <-> first  portal usage
1217                ondock       <-> successfull docking
1218                attack       <-> second portal usage -->
1219
1220    <DistanceTrigger name="attack" position="-1400,-500,800" target="Pawn" distance=100 stayActive="true" mode="and">
1221        <EventTrigger name="ondock" activations="1" stayactive="true" delay=6>
1222          <events>
1223            <trigger>
1224              <EventListener event="dockMe" />
1225            </trigger>
1226          </events>
1227            <Trigger mode=and>
1228              <DistanceTrigger name="toHydroFarmer" position="-47000,-1000,1300" target="Pawn" distance=100 stayActive="true" />
1229              <EventTrigger activations="1" invert="true">
1230                <events>
1231                  <trigger>
1232                    <EventListener event="gameEnd" />
1233                  </trigger>
1234                </events>
1235              </EventTrigger>
1236            </Trigger>
1237        </EventTrigger>
1238        <EventTrigger activations="1" invert="true">
1239          <events>
1240            <trigger>
1241              <EventListener event="earlyEnd" />
1242            </trigger>
1243          </events>
1244        </EventTrigger>
1245    </DistanceTrigger>
1246
1247    <SimpleNotification message="Return before it's too late. Boost with (Space)." broadcast="true">
1248        <events>
1249            <trigger>
1250                <EventListener event=ondock />
1251            </trigger>
1252        </events>
1253    </SimpleNotification>
1254
1255    <SimpleNotification message="Several serious enemies are approaching!">
1256        <events>
1257            <trigger>
1258                <EventListener event=attack />
1259            </trigger>
1260        </events>
1261    </SimpleNotification>
1262
1263
1264<!-- @Objects: 6 pirates, heading towards DuBall, attacking  -->
1265<!-- TODO: re-hide pirates on early end-->
1266<!-- 1 -->
1267    <SpaceShip position="3000,-4000,4000" lookat="-1300,-600,900" name="attacker"visible="true">
1268        <events>
1269            <visibility>
1270                <EventListener event="ondock" />
1271            </visibility>
1272        </events>
1273        <templates>
1274            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
1275        </templates>
1276        <controller>
1277            <WaypointPatrolController alertnessradius=3129 team=1 active=false>
1278                <waypoints>
1279                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
1280                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
1281                </waypoints>
1282                <events>
1283                    <activity>
1284                        <EventListener event="attack" /> <!-- activates enemies-->
1285                     </activity>
1286                </events>
1287            </WaypointPatrolController>
1288        </controller>
1289    </SpaceShip>
1290<!-- 2 -->
1291    <SpaceShip position="3000,-4000,-4000" lookat="-1300,-600,900" name="attacker" visible="true">
1292        <events>
1293            <visibility>
1294                <EventListener event="ondock" />
1295            </visibility>
1296        </events>
1297        <templates>
1298            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
1299        </templates>
1300        <controller>
1301            <WaypointPatrolController alertnessradius=3129 team=1 active=false>
1302                <waypoints>
1303                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
1304                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
1305                </waypoints>
1306                <events>
1307                    <activity>
1308                        <EventListener event="attack" /> <!-- activates enemies-->
1309                     </activity>
1310                </events>
1311            </WaypointPatrolController>
1312        </controller>
1313    </SpaceShip>
1314<!-- 3 -->
1315    <SpaceShip position="-4000,-3000,4000" lookat="-1300,-600,900" name="attacker" visible="true">
1316        <events>
1317            <visibility>
1318                <EventListener event="ondock" />
1319            </visibility>
1320        </events>
1321        <templates>
1322            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
1323        </templates>
1324        <controller>
1325            <WaypointPatrolController alertnessradius=3129 team=1 active=false>
1326                <waypoints>
1327                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
1328                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
1329                </waypoints>
1330                <events>
1331                    <activity>
1332                        <EventListener event="attack" /> <!-- activates enemies-->
1333                     </activity>
1334                </events>
1335            </WaypointPatrolController>
1336        </controller>
1337    </SpaceShip>
1338<!-- 4 -->
1339    <SpaceShip position="-3000,-3000,-5000" lookat="-1300,-600,900" name="attacker" visible="true">
1340        <events>
1341            <visibility>
1342                <EventListener event="ondock" />
1343            </visibility>
1344        </events>
1345        <templates>
1346            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
1347        </templates>
1348        <controller>
1349            <WaypointPatrolController alertnessradius=3129 team=1 active=false>
1350                <waypoints>
1351                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
1352                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
1353                </waypoints>
1354                <events>
1355                    <activity>
1356                        <EventListener event="attack" /> <!-- activates enemies-->
1357                     </activity>
1358                </events>
1359            </WaypointPatrolController>
1360        </controller>
1361    </SpaceShip>
1362<!-- 5 -->
1363    <SpaceShip position="4000,4000,3000" lookat="-1300,-600,900" name="attacker"visible="true">
1364        <events>
1365            <visibility>
1366                <EventListener event="ondock" />
1367            </visibility>
1368        </events>
1369        <templates>
1370            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
1371        </templates>
1372        <controller>
1373            <WaypointPatrolController alertnessradius=3129 team=1 active=false>
1374                <waypoints>
1375                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
1376                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
1377                </waypoints>
1378                <events>
1379                    <activity>
1380                        <EventListener event="attack" /> <!-- activates enemies-->
1381                     </activity>
1382                </events>
1383            </WaypointPatrolController>
1384        </controller>
1385    </SpaceShip>
1386<!-- 6 -->
1387    <SpaceShip position="2000,-4000,5000" lookat="-1300,-600,900" name="attacker" visible="true">
1388        <events>
1389            <visibility>
1390                <EventListener event="ondock" />
1391            </visibility>
1392        </events>
1393        <templates>
1394            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
1395        </templates>
1396        <controller>
1397            <WaypointPatrolController alertnessradius=3129 team=1 active=false>
1398                <waypoints>
1399                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
1400                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
1401                </waypoints>
1402                <events>
1403                    <activity>
1404                        <EventListener event="attack" /> <!-- activates enemies-->
1405                     </activity>
1406                </events>
1407            </WaypointPatrolController>
1408        </controller>
1409    </SpaceShip>
1410
1411
1412<!-- @Triggers: attacktriggerX <-> X enemies destroyed , X is an element of [1,6] -->
1413    <EventTrigger name="attacktrigger6" activations="1" stayactive="true">
1414      <events>
1415        <trigger>
1416          <EventListener event="attacker" />
1417        </trigger>
1418      </events>
1419      <EventTrigger name="attacktrigger5" activations="1" stayactive="true" delay=0.1>
1420        <events>
1421          <trigger>
1422            <EventListener event="attacker" />
1423          </trigger>
1424        </events>
1425        <EventTrigger name="attacktrigger4" activations="1" stayactive="true" delay=0.1>
1426          <events>
1427            <trigger>
1428              <EventListener event="attacker" />
1429            </trigger>
1430          </events>
1431          <EventTrigger name="attacktrigger3" activations="1" stayactive="true" delay=0.1>
1432            <events>
1433              <trigger>
1434                <EventListener event="attacker" />
1435              </trigger>
1436            </events>
1437            <EventTrigger name="attacktrigger2" activations="1" stayactive="true" delay=0.1>
1438              <events>
1439                <trigger>
1440                  <EventListener event="attacker" />
1441                </trigger>
1442              </events>
1443              <EventTrigger name="attacktrigger1" activations="1" stayactive="true" delay=0.1>
1444                <events>
1445                  <trigger>
1446                    <EventListener event="attacker" />
1447                  </trigger>
1448                </events>
1449              </EventTrigger>
1450            </EventTrigger>
1451          </EventTrigger>
1452        </EventTrigger>
1453      </EventTrigger>
1454    </EventTrigger>
1455
1456
1457    <SimpleNotification message="5 enemies left!" broadcast="true">
1458      <events>
1459        <trigger>
1460          <EventListener event="attacktrigger1" />
1461        </trigger>
1462      </events>
1463    </SimpleNotification>
1464
1465    <SimpleNotification message="4 enemies left!" broadcast="true">
1466      <events>
1467        <trigger>
1468          <EventListener event="attacktrigger2" />
1469        </trigger>
1470      </events>
1471    </SimpleNotification>
1472
1473    <SimpleNotification message="3 enemies left!" broadcast="true">
1474      <events>
1475        <trigger>
1476          <EventListener event="attacktrigger3" />
1477        </trigger>
1478      </events>
1479    </SimpleNotification>
1480
1481    <SimpleNotification message="2 enemies left!" broadcast="true">
1482      <events>
1483        <trigger>
1484          <EventListener event="attacktrigger4" />
1485        </trigger>
1486      </events>
1487    </SimpleNotification>
1488
1489    <SimpleNotification message="One enemy left!" broadcast="true">
1490      <events>
1491        <trigger>
1492          <EventListener event="attacktrigger5" />
1493        </trigger>
1494      </events>
1495    </SimpleNotification>
1496
1497    <SimpleNotification message="Well done. You finished this tutorial." broadcast="true">
1498      <events>
1499        <trigger>
1500          <EventListener event="attacktrigger6" />
1501        </trigger>
1502      </events>
1503    </SimpleNotification>
1504
1505<!-- @Triggers: postAttack <-> delayed attacktrigger6 -->
1506    <EventTrigger name="postAttack1" activations="1" stayactive="true" delay=4.1>
1507      <events>
1508        <trigger>
1509          <EventListener event="attacktrigger6" />
1510        </trigger>
1511      </events>
1512    </EventTrigger>
1513
1514    <EventTrigger name="postAttack2" activations="1" stayactive="true" delay=8.2>
1515      <events>
1516        <trigger>
1517          <EventListener event="attacktrigger6" />
1518        </trigger>
1519      </events>
1520    </EventTrigger>
1521
1522    <SimpleNotification message="Either quit by pressing (Esc) or ..." broadcast="true">
1523      <events>
1524        <trigger>
1525          <EventListener event="postAttack1" />
1526        </trigger>
1527      </events>
1528    </SimpleNotification>
1529
1530    <SimpleNotification message="... stay here to learn some tricks." broadcast="true">
1531      <events>
1532        <trigger>
1533          <EventListener event="postAttack2" />
1534        </trigger>
1535      </events>
1536    </SimpleNotification>
1537
1538<!-------------------------------------- |Bonus Part| --------------------------------------->
1539<!-- @Triggers: "bonusX" <->  delayed "attacktrigger6" -->
1540    <EventTrigger name="bonus1" activations="1" stayactive="true" delay=12.3>
1541      <events>
1542        <trigger>
1543          <EventListener event="attacktrigger6" />
1544        </trigger>
1545      </events>
1546    </EventTrigger>
1547    <EventTrigger name="bonus2" activations="1" stayactive="true" delay=16.4>
1548      <events>
1549        <trigger>
1550          <EventListener event="attacktrigger6" />
1551        </trigger>
1552      </events>
1553    </EventTrigger>
1554    <EventTrigger name="bonus3" activations="1" stayactive="true" delay=22>
1555      <events>
1556        <trigger>
1557          <EventListener event="attacktrigger6" />
1558        </trigger>
1559      </events>
1560    </EventTrigger>
1561    <EventTrigger name="bonus4" activations="1" stayactive="true" delay=28.1>
1562      <events>
1563        <trigger>
1564          <EventListener event="attacktrigger6" />
1565        </trigger>
1566      </events>
1567    </EventTrigger>
1568    <EventTrigger name="bonus5" activations="1" stayactive="true" delay=32.3>
1569      <events>
1570        <trigger>
1571          <EventListener event="attacktrigger6" />
1572        </trigger>
1573      </events>
1574    </EventTrigger>
1575    <EventTrigger name="bonus6" activations="1" stayactive="true" delay=36.5>
1576      <events>
1577        <trigger>
1578          <EventListener event="attacktrigger6" />
1579        </trigger>
1580      </events>
1581    </EventTrigger>
1582    <EventTrigger name="bonus7" activations="1" stayactive="true" delay=4.1>
1583      <events>
1584        <trigger>
1585          <EventListener event="bonus6" />
1586        </trigger>
1587      </events>
1588    </EventTrigger>
1589
1590
1591
1592    <SimpleNotification message="Rotate your ship. Press (Q) or (E). "  broadcast="true">
1593        <events>
1594            <trigger>
1595                <EventListener event=bonus1 />
1596            </trigger>
1597        </events>
1598    </SimpleNotification>
1599
1600    <SimpleNotification message="Switch the camera's position. Press (C). "  broadcast="true">
1601        <events>
1602            <trigger>
1603                <EventListener event=bonus2 />
1604            </trigger>
1605        </events>
1606    </SimpleNotification>
1607
1608    <SimpleNotification message="360° view: press (Ctrl) + use the mouse "  broadcast="true">
1609        <events>
1610            <trigger>
1611                <EventListener event=bonus3 />
1612            </trigger>
1613        </events>
1614    </SimpleNotification>
1615
1616    <SimpleNotification message="Have a look at the main menu's settings."  broadcast="true">
1617        <events>
1618            <trigger>
1619                <EventListener event=bonus4 />
1620            </trigger>
1621        </events>
1622    </SimpleNotification>
1623
1624    <SimpleNotification message="E.g: Settings > Miscellaneous > Nr. of bots"  broadcast="true">
1625        <events>
1626            <trigger>
1627                <EventListener event=bonus5 />
1628            </trigger>
1629        </events>
1630    </SimpleNotification>
1631
1632    <SimpleNotification message="You successfully finished Mission One!"  broadcast="true">
1633        <events>
1634            <trigger>
1635                <EventListener event=bonus6 />
1636            </trigger>
1637        </events>
1638    </SimpleNotification>
1639
1640    <SimpleNotification message="Press (Esc) and return to the main menu."  broadcast="true">
1641        <events>
1642            <trigger>
1643                <EventListener event=bonus7 />
1644            </trigger>
1645        </events>
1646    </SimpleNotification>
1647
1648
1649    <!--Script code="addBots 3" onLoad="false">
1650        <events>
1651            <trigger>
1652                <EventListener event=bonus6 />
1653            </trigger>
1654        </events>
1655    </Script>
1656
1657    <Script code="artificialcontroller setbotlevel 0.1" onLoad="false">
1658        <events>
1659            <trigger>
1660                <EventListener event=bonus6 />
1661            </trigger>
1662        </events>
1663    </Script-->
1664    <!-- Script code="artificialcontroller setbotlevel 0.1" /-->
1665  </Scene>
1666</Level>
1667
1668<!-- TODO:
1669- Story & more precise Questmessages; more quest hints; fail-quest;
1670- Colouring: Show who is friend or foe via the colour
1671- Waypoints: show the player the way
1672- Foolproof text messages (e.g. verspätete Nachrichten unterdrücken ~done )
1673- End Tutorial, if either the Hydrogen Farmer or the SpaceCruiser gets destroyed. (~done)
1674 -->
Note: See TracBrowser for help on using the repository browser.