Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/archive/tutorial2/data/levels/missionOne.oxw @ 12380

Last change on this file since 12380 was 9016, checked in by jo, 13 years ago

Merging presentation2011 branch to trunk. Please check for possible bugs.

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