Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentation2012merge/data/levels/pirateAttack.oxw @ 9345

Last change on this file since 9345 was 9316, checked in by dafrick, 12 years ago

Replacing unlicend skyboxes

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