Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/cegui0.8_ogre1.9/data/levels/pirateAttack.oxw @ 12068

Last change on this file since 12068 was 11808, checked in by landauf, 7 years ago

attach Planets to MovableEntities to make them move (Planets are static now)

  • Property svn:eol-style set to native
File size: 25.8 KB
Line 
1<LevelInfo
2 name = "Pirate Attack"
3 description = "Dani's Testlevel"
4 tags = "mission"
5 screenshot = "pirateattack.png"
6/>
7
8<?lua
9  include("HUDTemplates3.oxo")
10  include("stats.oxo")
11  include("templates/spaceshipAssff.oxt")
12  include("templates/spaceshipPirate.oxt")
13  include("templates/lodInformation.oxt")
14?>
15
16<Template name=spaceshipassffplayer defaults=0>
17  <SpaceShip template=spaceshipassff name=player>
18    <attached>
19    <DistanceTriggerBeacon name=Me/>
20    </attached>
21  </SpaceShip>
22</Template>
23
24<?lua
25    dofile("includes/CuboidSpaceStation.lua")
26?>
27
28<WorldAmbientSound source="Mars.ogg" looping="true" playOnLoad="true" />
29   
30<Level
31name="Dani's Testlevel"
32description="Erste Versuche mit den Quests"
33gametype=Mission
34>
35
36  <templates>
37    <Template link=lodtemplate_default />
38  </templates>
39  <?lua include("includes/notifications.oxi") ?>
40
41    <Scene
42        ambientlight = "0.3, 0.3, 0.3"
43        skybox       = "Orxonox/skyBoxBasic"
44    >
45
46        <Script code="showGUI NotificationLayer false true" needsGraphics="true" />
47
48        <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" />
49
50
51          <GlobalQuest id="dbd02b4c-ab7c-46fd-bdaf-fd4c19ac1551">
52        <QuestDescription title="Fight for freedom"
53                    description="Just a few hours ago, a group of pirates attacked an killed all your  squad members. Now you are very angry and you want to take revenge. Find the pirates and kill them!"
54                    failmessage="You are a loser, now the whole universe will be controlled by the pirates!"
55                    completeMessage="Yeah, you did it! You,ve eliminated the enemies. But why attacked them the Humans here? For tousands of years, there was peace in this sun system.
56                                You have to find out what happened exactly and why the pirates attacked..."/>
57            <subquests>
58                <GlobalQuest id="3159b4d4-bc86-4190-ba1d-4530668dfe31">
59                    <QuestDescription title="The stolen stick..."
60                    description="Now you can see it: There are more pirates... the pirates you killed were only a small part of the whole fleet. You received a message from your Headquarter: The pirates have stolen
61                            a very important memory stick with secret infos (military locations etc.), the holy stick. You must get it back! Otherwise the humans are in great danger..."
62                    failmessage=""
63                    completeMessage="Unbelievable, you annihilated all pirates and got the stolen memory stick.
64                                But wait... this isn't the memory stick you looked for, this stick is one from a pirate... anyway, it's helpful: There is a map saved on it, which leads you to a pirate - base. Perhaps you'll find more
65                                about their plans there..."/>
66                </GlobalQuest>
67                <GlobalQuest id="8d8ed3a6-74a6-4491-9172-26155cff151d">
68                    <QuestDescription title="Find the Base"
69                    description="Now you are in possession of the map and it should be easy to find the base. Because you are a Member of an elite-fight-squad, your ship has been pimped before you started your mission.
70                        They installed a very modern navigation system, which leads you precisely to your desired destination. Use it to find the pirate - base."
71                    failmessage=""
72                    completeMessage="The navigation system worked very well and now you should be near a pirate -base." />
73                    <hints>
74                        <QuestHint id="965101b3-26ce-4fcf-bc71-17cc2a87d2e9">
75                        <QuestDescription title="3 Ways?"
76                        description="The different ways leads you to the possible positions where the base could be. The problem is that the map is encrypted and your on board system is not
77                                able to decrypt it exactly. Therefore you have to try 3 possible ways...Tha base is Huge, but it could be that it's invisible when ou are in longer distance (some Big Ships
78                                have a special shield aroud them which make them invisible at longer range)."/>
79                        </QuestHint>
80                    </hints>
81                </GlobalQuest>
82                <GlobalQuest  id="9930a598-98bc-4ff8-8cc0-31311a6ccaaa">
83                    <QuestDescription title=":(" description="Here isn't the base you look for... try another way."/>
84                </GlobalQuest>
85                <GlobalQuest id="9930a598-98bc-4ff8-8cc0-31311a6ccaab">
86                    <QuestDescription title=":(" description="Here isn't the base you look for... try another way."/>
87                </GlobalQuest>
88                <GlobalQuest id="8a62408b-c47b-4e02-bd3d-06bb9ec0b363">
89                    <QuestDescription title="The Base"
90                    description="Yeah, you found the Base... now let's check if there is the important holy stick..."
91                    failmessage=""
92                    completeMessage="There it is, the Holy stick. Yes, you're right. It looks like a rocket because there are so many rockets in the universe, that it's nearly impossible to find the holy stick between them.
93                                Anyway, the pirates found the stick... another part which is confusing. Why did they know where the holy stick is? Perpaps they know more about the humans than you think."/>
94                </GlobalQuest>
95                <GlobalQuest id="85380d05-b791-45d1-82e9-01f0bc930367">
96                    <QuestDescription title="Find out more about the pirates"
97                    description= "Now, the Holy stick is back in your possession. Your new mission is to get some more infos about the pirates. You've got an info about a near mining company
98                    which delivers Hydrogen out of special asteroids. Hydrogen is a very rare ressource on earth and is delivered by a few great mining companys. There is no oil anymore on earth since many years.
99                    Therefore hydrogen became the most important energy source for all humans.
100                    But back to your mission. The mining company has it's own security. Ask some of their security staff if they know more about the pirates... it's actually your only hope to get more infos.
101                    You'll find the mining company at the near planet with the asteroid belt."
102                    failmessage=""
103                    completeMessage=""/>
104                </GlobalQuest>
105                <GlobalQuest id="d8afe2eb-b3b9-4c98-8ed7-cc1a2a8e3734">
106                    <QuestDescription title="Interesting..."
107                    description= "You're very lucky. The first security man has interesting infos about the pirates. He said that they made a few attacks in de last few weeks and they intensified the attacks in the last days...
108                    Shit, they attack one more time. Fight them back!"
109                    failmessage=""
110                    completeMessage=""/>
111                </GlobalQuest>
112            </subquests>
113            <hints>
114                <QuestHint id="2b85f32c-2433-4f1a-bdd4-f24d20c9403c">
115                    <QuestDescription title="Useful to know" description="Pirates like to hide themselves behind asteroids."/>
116                </QuestHint>
117            </hints>
118            <fail-effects>
119            </fail-effects>
120            <complete-effects>
121            </complete-effects>
122        </GlobalQuest>
123   
124          <ParticleSpawner position="0,0,0" source="Orxonox/BigExplosion1part3" lifetime=2.0 loop=0 autostart=0>
125          <events>
126            <spawn>
127              <EventTrigger delay=1>
128            <events>
129              <trigger>
130                <SpawnPoint position="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassffplayer name=spawnpoint1 team=0 active=true/>
131              </trigger>
132            </events>
133              </EventTrigger>
134            </spawn>
135          </events>
136          <attached>
137            <QuestEffectBeacon position="0,0,0" times=1>
138            <effects>
139                <AddQuest questId="dbd02b4c-ab7c-46fd-bdaf-fd4c19ac1551" />
140            </effects>
141            <events>
142                <execute>
143                <EventListener event=questbeacon1 />
144                </execute>
145            </events>
146            <attached>
147                <DistanceTrigger name=questbeacon1 position="0,0,0" distance=100 target="Pawn" beaconMode="identify" targetname=Me/>
148            </attached>
149            </QuestEffectBeacon>
150          </attached>
151        </ParticleSpawner>
152   
153        <SpawnPoint position="600,300,-6000" spawnclass=SpaceShip pawndesign=spaceshipassffplayer name=spawnpoint2 active=false/>
154   
155   
156   
157        <!-- Add second Quest-->
158        <QuestEffectBeacon position="250,-300,-1500" times=1>
159                    <attached>
160                        <Billboard position="0,0,0" scale=3 colour="1.0,1.0,0" material="Examples/Flare" />
161                        <DistanceTrigger name=questbeacon2 targetname=Me position="0,0,0" target="Pawn" beaconMode="identify" distance=400 />
162                    </attached>
163                    <effects>
164                        <AddQuest questId="3159b4d4-bc86-4190-ba1d-4530668dfe31" />
165                    </effects>
166                    <events>
167                        <execute>
168                            <EventListener event=questbeacon2 />
169                        </execute>
170                    </events>
171                </QuestEffectBeacon>
172   
173        <!-- Hint to first Quest-->
174        <QuestEffectBeacon position="0,0,0" times=1>
175                    <attached>
176                        <DistanceTrigger name=questbeacon3  position="0,0,0" distance=300 target="Pawn" beaconMode="identify" targetname=Me delay="5" />
177                    </attached>
178                    <effects>
179                        <AddQuestHint hintId="2b85f32c-2433-4f1a-bdd4-f24d20c9403c" />
180                    </effects>
181                    <events>
182                        <execute>
183                            <EventListener event=questbeacon3 />
184                        </execute>
185                    </events>
186                </QuestEffectBeacon>
187   
188   
189        <!--Pirates killed... navi leads you to possible Base stations-->
190        <QuestEffectBeacon position="600,300,-6000" times=1>
191                    <attached>
192                        <Billboard position="0,0,0" scale=3 colour="0,1.0,0" material="Examples/Flare" />
193                        <DistanceTrigger name=questbeacon4  position="0,0,0" distance=200 target="Pawn" beaconMode="identify" targetname=Me />
194                    </attached>
195   
196                    <effects>
197                        <CompleteQuest questId="3159b4d4-bc86-4190-ba1d-4530668dfe31" />
198                        <AddQuest questId="8d8ed3a6-74a6-4491-9172-26155cff151d" />
199                        <AddQuestHint hintId="965101b3-26ce-4fcf-bc71-17cc2a87d2e9" />
200                    </effects>
201                    <events>
202                        <execute>
203                            <EventListener event=questbeacon4 />
204                        </execute>
205                    </events>
206                </QuestEffectBeacon>
207   
208   
209        <!-- Wrong way 1-->
210        <QuestEffectBeacon position="7600,300,-8000" times=1>
211                    <attached>
212                        <DistanceTrigger name=questbeacon5  position="0,0,0" distance=300 target="Pawn" beaconMode="identify" targetname=Me />
213                    </attached>
214                    <effects>
215                        <AddQuest questId="9930a598-98bc-4ff8-8cc0-31311a6ccaaa" />
216                    </effects>
217                    <events>
218                        <execute>
219                            <EventListener event=questbeacon5 />
220                        </execute>
221                    </events>
222                </QuestEffectBeacon>
223   
224        <!-- Wrong way 2-->
225        <QuestEffectBeacon position="1600,2300,-10000" times=1>
226                    <attached>
227                        <DistanceTrigger name=questbeacon8  position="0,0,0" distance=300 target="Pawn" beaconMode="identify" targetname=Me />
228                    </attached>
229                    <effects>
230                        <AddQuest questId="9930a598-98bc-4ff8-8cc0-31311a6ccaab" />
231                    </effects>
232                    <events>
233                        <execute>
234                            <EventListener event=questbeacon8 />
235                        </execute>
236                    </events>
237                </QuestEffectBeacon>
238   
239        <!-- Base found!-->
240        <QuestEffectBeacon position="4600,5300,-11000" times=1>
241                    <attached>
242                        <DistanceTrigger name=questbeacon6  position="0,0,0" distance=600 target="Pawn" beaconMode="identify" targetname=Me />
243                    </attached>
244                    <effects>
245                        <CompleteQuest questId="8d8ed3a6-74a6-4491-9172-26155cff151d" />
246                        <AddQuest questId="8a62408b-c47b-4e02-bd3d-06bb9ec0b363" />
247                        <CompleteQuest questId="9930a598-98bc-4ff8-8cc0-31311a6ccaaa" />
248                        <CompleteQuest questId="9930a598-98bc-4ff8-8cc0-31311a6ccaab" />
249   
250                    </effects>
251                    <events>
252                        <execute>
253                            <EventListener event=questbeacon6 />
254                        </execute>
255                    </events>
256                </QuestEffectBeacon>
257        <!--Stick found-->
258        <QuestEffectBeacon position="4800,5785,-10725" times=1>
259                    <attached>
260                        <DistanceTrigger name=questbeacon7  position="0,0,0" distance=30 target="Pawn" beaconMode="identify" targetname=Me />
261                    </attached>
262                    <effects>
263                        <CompleteQuest questId="8a62408b-c47b-4e02-bd3d-06bb9ec0b363" />
264                        <AddQuest questId="85380d05-b791-45d1-82e9-01f0bc930367" />
265   
266                    </effects>
267                    <events>
268                        <execute>
269                            <EventListener event=questbeacon7 />
270                        </execute>
271                    </events>
272                </QuestEffectBeacon>
273   
274   
275        <!--Security Man found-->
276        <QuestEffectBeacon position="4000,4000,-20000" times=1>
277                    <attached>
278                        <Billboard position="0,0,0" scale=3 colour="0,0,1.0" material="Examples/Flare" />
279                        <DistanceTrigger name=questbeacon9 position="0,0,0" distance=500 target="Pawn" beaconMode="identify" targetname=Me />
280                    </attached>
281                    <effects>
282                        <CompleteQuest questId="85380d05-b791-45d1-82e9-01f0bc930367" />
283                        <AddQuest questId="d8afe2eb-b3b9-4c98-8ed7-cc1a2a8e3734" />
284   
285                    </effects>
286                    <events>
287                        <execute>
288                            <EventListener event=questbeacon9 />
289                        </execute>
290                    </events>
291        </QuestEffectBeacon>
292   
293    <!--Navigation System which shows possiple positions of base-->
294    <EventDispatcher>
295                <targets>
296                    <EventTarget target=Navi />
297                </targets>
298                <events>
299                    <visibility>
300                        <QuestListener questId="3159b4d4-bc86-4190-ba1d-4530668dfe31" mode="complete" />
301                    </visibility>
302                    <activity>
303                        <QuestListener questId="3159b4d4-bc86-4190-ba1d-4530668dfe31" mode="complete" />
304                    </activity>
305                </events>
306            </EventDispatcher>
307
308            <?lua
309                for i = 0, 30
310                do
311            ?>
312        <Billboard position="<?lua print(i*1000/30+600) ?>,<?lua print(i*2000/30+300) ?>,<?lua print(-i*4000/30-6000) ?>" colour="1.0,0,0" scale=1 material="Examples/Flare" name=Navi visible=false/><!--endpos:1600,2300,-10000-->
313        <Billboard position="<?lua print(i*7000/30+600) ?>,<?lua print(i*0/30+300) ?>,<?lua print(-i*2000/30-6000) ?>" colour="0,1.0,0" scale=1 material="Examples/Flare" name=Navi visible=false/><!--endpos:7600,300,-8000-->
314        <Billboard position="<?lua print(i*4000/30+600) ?>,<?lua print(i*5000/30+300) ?>,<?lua print(-i*5000/30-6000) ?>" colour="0,0,1.0" scale=1 material="Examples/Flare" name=Navi visible=false/><!--endpos:4600,5300,-11000-->
315            <?lua
316                end
317            ?>
318   
319    <!--Base&Stick spawn*****************************************************************-->
320    <StaticEntity scale=1 position="4650,5350,-11050" name=base visible=true active=true yaw=60>
321                <attached>
322                    <?lua
323                        createSpaceStationPar(9851,2,1,2,1,2,1,100)
324                    ?>
325                </attached>
326            </StaticEntity>
327   
328    <ParticleSpawner position="4650,5350,-11050" source="Orxonox/explosion1" name=base visible=false active=false loop=0/>
329    <Model position="4800,5785,-10725" scale=3 mesh="rocket.mesh" visible=true active=true name=base />
330    <EventDispatcher>
331                <targets>
332                    <EventTarget target=base />
333             <EventTarget target=navipirate1 />
334              <EventTarget target=navipirate2 />
335                </targets>
336                <events>
337                    <visibility>
338          <EventTrigger invert=true>
339            <events>
340              <trigger>
341                <QuestListener questId="dbd02b4c-ab7c-46fd-bdaf-fd4c19ac1551" mode="start" />
342              </trigger>
343            </events>
344          </EventTrigger>
345                    </visibility>
346                    <activity>
347                <EventTrigger invert=true>
348            <events>
349              <trigger>
350                             <QuestListener questId="dbd02b4c-ab7c-46fd-bdaf-fd4c19ac1551" mode="start" />
351              </trigger>
352            </events>
353          </EventTrigger>
354                    </activity>
355                </events>
356            </EventDispatcher>
357
358   
359    <EventDispatcher>
360                <targets>
361                    <EventTarget target=base />
362                </targets>
363                <events>
364                    <visibility>
365                        <QuestListener questId="8d8ed3a6-74a6-4491-9172-26155cff151d" mode="complete" />
366                    </visibility>
367                    <activity>
368                        <QuestListener questId="8d8ed3a6-74a6-4491-9172-26155cff151d" mode="complete" />
369                    </activity>
370                </events>
371            </EventDispatcher>
372   
373    <!--Base&Stick spawn********end*****************************************************-->
374   
375    <!--Change spawnoint-->
376    <EventDispatcher>
377                <targets>
378                    <EventTarget target=spawnpoint1 />
379                </targets>
380                <events>
381                    <activity>
382                <EventTrigger invert=true>
383            <events>
384              <trigger>
385                             <QuestListener questId="3159b4d4-bc86-4190-ba1d-4530668dfe31" mode="complete" />
386              </trigger>
387            </events>
388          </EventTrigger>
389                    </activity>
390                </events>
391   
392            </EventDispatcher>
393            <EventDispatcher>
394                <targets>
395                    <EventTarget target=spawnpoint2/>
396                </targets>
397                <events>
398                    <activity>
399                             <QuestListener questId="3159b4d4-bc86-4190-ba1d-4530668dfe31" mode="complete" />
400                    </activity>
401                </events>
402            </EventDispatcher>
403    <!--Change spawnoint end-->
404   
405    <!-- pirates -->
406        <?lua
407        for i = 1,1, 1
408        do
409        ?>
410            <SpaceShip position="<?lua print(math.random()*100)?>,<?lua print(math.random()*100)?>,<?lua print(math.random()*100-2000)?>">
411              <templates>
412            <Template link=spaceshippirate />
413              </templates>
414              <controller>
415            <WaypointPatrolController alertnessradius=1000 active=true team=1>
416              <waypoints>
417                <StaticEntity position="0,<?lua print(math.random()*50)?> ,<?lua print(i*50 -2000) ?>" />
418              </waypoints>
419            </WaypointPatrolController>
420              </controller>
421            </SpaceShip>
422        <?lua
423        end
424        ?>
425   
426        <?lua
427        for i = 1,2, 1
428        do
429        ?>
430            <SpaceShip position="600,300,-6000">
431              <templates>
432            <Template link=spaceshippirate />
433              </templates>
434              <controller>
435            <WaypointPatrolController alertnessradius=1000 active=true team=1>
436              <waypoints>
437                <StaticEntity position="600,300,-6000" />
438              </waypoints>
439            </WaypointPatrolController>
440              </controller>
441            </SpaceShip>
442        <?lua
443        end
444        ?>
445   
446    <!-- Pirates at the end of wrong Navi line (get visible when you get near them)-->
447     <SpaceShip position="1600,2300,-10000" active=true visible=true name=navipirate1>
448              <templates>
449            <Template link=spaceshippirate />
450              </templates>
451              <controller>
452            <WaypointPatrolController alertnessradius=1000 name=navipirate1 active=true team=1>
453              <waypoints>
454                <StaticEntity position="1600,2300,-10000" />
455              </waypoints>
456            </WaypointPatrolController>
457              </controller>
458            </SpaceShip>
459   
460    <SpaceShip position="7600,300,-8000" active=true visible=true name=navipirate2>
461              <templates>
462            <Template link=spaceshippirate />
463              </templates>
464              <controller>
465            <WaypointPatrolController alertnessradius=1000 name=navipirate2 active=true team=1>
466              <waypoints>
467                <StaticEntity position="7600,300,-8000" />
468              </waypoints>
469            </WaypointPatrolController>
470              </controller>
471        </SpaceShip>
472   
473   
474    <EventDispatcher>
475                <targets>
476                    <EventTarget target=navipirate1 />
477                </targets>
478                <events>
479                    <visibility>
480                        <QuestListener questId="9930a598-98bc-4ff8-8cc0-31311a6ccaab" mode="start" />
481                    </visibility>
482                    <activity>
483                        <QuestListener questId="9930a598-98bc-4ff8-8cc0-31311a6ccaab" mode="start" />
484                    </activity>
485                </events>
486            </EventDispatcher>
487   
488    <EventDispatcher>
489                <targets>
490                    <EventTarget target=navipirate2 />
491                </targets>
492                <events>
493                    <visibility>
494                        <QuestListener questId="9930a598-98bc-4ff8-8cc0-31311a6ccaaa" mode="start" />
495                    </visibility>
496                    <activity>
497                        <QuestListener questId="9930a598-98bc-4ff8-8cc0-31311a6ccaaa" mode="start" />
498                    </activity>
499                </events>
500            </EventDispatcher>
501    <!-- Pirates at the end of wrong Navi line **** end-->
502   
503    <!--Security man from mining corp.-->
504    <SpaceShip position="4000,4000,-20000">
505              <templates>
506            <Template link=spaceshipassff/>
507              </templates>
508              <controller>
509            <WaypointPatrolController alertnessradius=1000 team=0 active=false>
510              <waypoints>
511                <StaticEntity position="4000,4000,-20000" />
512              </waypoints>
513            </WaypointPatrolController>
514              </controller>
515    </SpaceShip>
516   
517    <!-- Asteroid field-->
518            <StaticEntity position="-400,2000,-7000">
519                <attached>
520                    <?lua
521                        for i = 1, 180
522                        do ?>
523                        <MovableEntity position="<?lua print(math.random() * 10000 -5000)?>, <?lua print(math.random() * 10000-5000) ?>, <?lua print(math.random() * 10000 -7000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.abs(math.random() * 30 -10)) ?>">
524                            <attached>
525                                <Model scale="<?lua print(math.random() * 100) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
526                            </attached>
527                        </MovableEntity>
528                    <?lua
529                        end
530                    ?>
531            </attached>
532        </StaticEntity>
533    <!--Planet with asteroid belt-->
534    <MovableEntity position="2600,4300,-20000" scale=1000>
535        <attached>
536            <Planet mesh="iceplanet.mesh" atmosphere="atmosphere1" atmospheresize=224.0f imagesize=1024.0f/>
537        </attached>
538    </MovableEntity>
539    <StaticEntity position="2600,4300,-20000" collisionType=static>
540          <collisionShapes>
541            <SphereCollisionShape radius="1000" />
542          </collisionShapes>
543                          <attached>
544                <?lua
545                for i = 1, 100
546                do
547                k=(math.random() * 2600 -1300)
548                if math.random()<0.5 then
549                l=(1300^2-k^2)^(0.5)
550                else
551                l=-(1300^2-k^2)^(0.5)
552                end
553                ?>
554   
555                <MovableEntity position="<?lua print(k) ?>,<?lua print(l) ?>, <?lua print(math.random() * 100) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.abs(math.random() * 30 -10)) ?>">
556
557                    <attached>
558                    <Model scale="<?lua print(math.random() * 25) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
559                    </attached>
560                </MovableEntity>
561                <?lua
562                end
563                ?>
564                            </attached>
565        </StaticEntity>
566   
567    </Scene>
568</Level>
Note: See TracBrowser for help on using the repository browser.