Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 12288 was 11802, checked in by landauf, 7 years ago

migrated NotificationLayer.lua to cegui 0.8

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