Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/campaignHS15/data/levels/Campaign1.oxw @ 10749

Last change on this file since 10749 was 10749, checked in by bhatiab, 8 years ago

Added planets, changed skybox, fixed asteroids, changed starting spaceschip, removed unneccessary code

File size: 26.4 KB
Line 
1<LevelInfo
2    name = "CampaignHS15 1"
3    description = "Protect the transporter!"
4    tags = "mission"
5    screenshot = "missionOne.png"
6/>
7
8<?lua
9    include("stats.oxo")
10    include("HUDTemplates3.oxo")
11    include("templates/lodInformation.oxt")
12
13    include("templates/spaceshipAssff2.oxt")
14    include("templates/spaceshipPirate.oxt")
15    include("templates/spaceshipEscort.oxt")
16    include("templates/spaceshipTransporter.oxt")
17    include("templates/FPS.oxt")
18?>
19
20<Level gametype = "Mission">
21    <templates>
22        <Template link="lodtemplate_default" />
23    </templates>
24
25    <?lua include("includes/notifications.oxi") ?>
26
27    <NotificationQueueCEGUI
28        name="narrative"
29        targets="simpleNotification"
30        size=3
31        displayTime=3.9
32        position="0.15, 0, 0.1, 0"
33        fontSize="23"
34        fontColor="0.3, 1, 0.2, 0.8"
35        alignment="HorzCentred"
36        displaySize="0.7, 0, 0, 0"
37    />
38
39    <!-- GLOBAL LUA VARIABLES -->
40    <?lua
41        waves = 3
42        enemies = 5
43        allies = 5
44    ?>
45
46    <Scene
47        ambientlight = "0.8, 0.8, 0.8"
48        skybox = "Orxonox/skyBoxMoreNebula"
49        hasPhysics = true
50    >
51
52    <SpawnPoint name="playerSpawn" team=0 position="0,-50,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
53
54    <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" />
55
56    <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"/>
57
58    <!--QUEST DEFINITIONS-->
59
60    <GlobalQuest id="quest1">
61        <QuestDescription title="Reach the Station A!" description="" failMessage="" completeMessage="" />
62        <hints>
63            <QuestHint id="quest1hint1" />
64        </hints>
65        <complete-effects>
66            <AddQuest questId="quest2" />
67            <AddQuest questId="quest2.1" />
68        </complete-effects>
69    </GlobalQuest>
70
71    <GlobalQuest id="quest2">
72        <QuestDescription title="Prepare to fight the Enemy" description="" failMessage="" completeMessage="" />
73        <hints>
74        </hints>
75        <subquests>
76            <GlobalQuest id="quest2.1">
77                <QuestDescription title="> Get a better Spaceship" description="" failMessage="" completeMessage="" />
78                <complete-effects>
79                    <AddQuest questId="quest2.2" />
80                </complete-effects>
81            </GlobalQuest>
82            <GlobalQuest id="quest2.2">
83                <QuestDescription title="> Meet your Unit" description="" failMessage="" completeMessage="" />
84            </GlobalQuest>
85        </subquests>
86        <complete-effects>
87            <AddQuest questId="quest3" />
88        </complete-effects>
89    </GlobalQuest>
90
91    <GlobalQuest id="quest3">
92        <QuestDescription title="Fight the first Wave" description="" failMessage="" completeMessage="" />
93        <hints>
94        </hints>
95        <complete-effects>
96            <AddQuest questId="quest4" />
97            <AddQuest questId="quest4.1" />
98            <AddQuest questId="quest4.2" />
99        </complete-effects>
100    </GlobalQuest>
101
102    <GlobalQuest id="quest4">
103        <QuestDescription title="Prepare for the next Wave" description="" failMessage="" completeMessage="" />
104        <hints>
105        </hints>
106        <subquests>
107            <GlobalQuest id="quest4.1">
108                <QuestDescription title="> Get to the Defense Station" description="" failMessage="" completeMessage="" />
109            </GlobalQuest>
110            <GlobalQuest id="quest4.2">
111                <QuestDescription title="> Find the turret" description="" failMessage="" completeMessage="" />
112            </GlobalQuest>
113        </subquests>
114        <complete-effects>
115            <AddQuest questId="quest5" />
116        </complete-effects>
117    </GlobalQuest>
118
119    <GlobalQuest id="quest5">
120        <QuestDescription title="Fight the Hord!" description="" failMessage="" completeMessage="" />
121        <hints>
122        </hints>
123        <complete-effects>
124            <AddQuest questId="quest6" />
125            <AddQuest questId="quest6.1" />
126            <AddQuest questId="quest6.2" />
127        </complete-effects>
128    </GlobalQuest>
129
130    <GlobalQuest id="quest6">
131        <QuestDescription title="Get back to the Transporter" description="" failMessage="" completeMessage="" />
132        <hints>
133        </hints>
134        <subquests>
135            <GlobalQuest id="quest6.1">
136                <QuestDescription title="> Collect the local Pickups" description="" failMessage="" completeMessage="" />
137            </GlobalQuest>
138            <GlobalQuest id="quest6.2">
139                <QuestDescription title="> Use Portal to the Transporter" description="" failMessage="" completeMessage="" />
140            </GlobalQuest>
141        </subquests>
142        <complete-effects>
143            <AddQuest questId="quest7" />
144        </complete-effects>
145    </GlobalQuest>
146
147    <GlobalQuest id="quest7">
148        <QuestDescription title="Fight the final Wave" description="" failMessage="" completeMessage="" />
149        <hints>
150        </hints>
151        <subquests>
152        </subquests>
153    </GlobalQuest>
154
155    <!--EVENTS AND TRIGGERS
156        Usable events and triggers:
157        _spawntrigger
158        _reachedA
159        _dock<A|B|C>
160        _docked<A>      WIP; see below
161        -joinedUnit
162        _wave<k>
163        _killedEnemy<k>.<i>
164        _waveClear<k>
165    -->
166
167    <EventMultiTrigger name="spawntrigger">
168        <events>
169            <trigger>
170                <EventListener event="playerSpawn" />
171            </trigger>
172        </events>
173    </EventMultiTrigger>
174
175    <DistanceTrigger name="reachedA" position="5000,-3000,0" distance=1000 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true />
176
177    <!-- TODO: find out how to link an event to the COMPLETION of a dock. How is this not possible?? -->
178    <EventMultiTrigger name="dockedA" activations="1" stayactive="true" delay=3>
179        <events>
180            <trigger>
181                <EventListener event="dockA" />
182            </trigger>
183        </events>
184    </EventMultiTrigger>
185
186    <!-- TODO: fictive unit; to be added later -->
187    <DistanceTrigger name="joinedUnit" position="3000,-2000,0" distance=100 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true />
188    <Billboard position="3000,-1000,0" amplitude=1 material="Flares/lensflare" colour="1,0,0.05" />     <!-- For debugging puropses -->
189
190    <EventMultiTrigger name="wave1" activations="1" stayactive="true" delay=4>
191        <events>
192            <trigger>
193                <EventListener event="joinedUnit" />
194            </trigger>
195        </events>
196    </EventMultiTrigger>
197
198    <!-- Recursive helper function for the end-of-wave events. F*ck the event system, seriously. -->
199    <?lua
200    function enemyTriggerRecursor(i, k)
201    if i > 0 then
202    return [[
203    <EventTrigger name=killedEnemy]] .. k .. [[.]] .. i .. [[ activations=1 stayactive=true delay=0.1>
204        <events>
205            <trigger>
206                <EventListener event=attackers]] .. k .. [[ />
207            </trigger>
208        </events>
209        ]] .. enemyTriggerRecursor(i-1, k) .. [[
210    </EventTrigger>
211    ]]
212    else return ""
213    end
214    end
215    ?>
216    <!-- Actual recursive Event(s) for the respective waves. -->
217    <?lua
218    for k = 1, waves, 1
219    do
220    print(enemyTriggerRecursor(enemies,k))
221    ?>
222    <EventMultiTrigger name="waveClear<?lua print(k) ?>" delay=4.0>
223        <events>
224            <trigger>
225                <EventListener event="killedEnemy<?lua print(k .. [[.]] .. enemies) ?>" />
226            </trigger>
227        </events>
228    </EventMultiTrigger>
229    <?lua end ?>
230
231    <!-- FIXME: This trigger needs fixing, as endMission can only be called by a Pawn Distance Trigger. Herpaderp.
232        Also, the fix proposed in MissionOne does not work anymore... -->
233   <EventMultiTrigger name="missionFailed" target="Pawn" stayActive="true" delay=1.5>
234       <events>
235           <trigger>
236               <EventListener event="transporter" />
237           </trigger>
238       </events>
239   </EventMultiTrigger>
240
241    <Script code="Mission endMission fail" onLoad="false">
242        <events>
243            <trigger>
244                <EventListener event="missionFailed" />
245            </trigger>
246        </events>
247    </Script>
248
249    <!--QUEST EFFECT BEACONS -->
250
251    <QuestEffectBeacon times=1>
252        <effects>
253            <AddQuest questId="quest1" />
254        </effects>
255        <events>
256            <execute>
257                <EventListener event="spawntrigger" />
258            </execute>
259        </events>
260    </QuestEffectBeacon>
261
262    <QuestEffectBeacon times=1>
263        <effects>
264            <CompleteQuest questId="quest1" />
265        </effects>
266        <events>
267            <execute>
268                <EventListener event="reachedA" />
269            </execute>
270        </events>
271    </QuestEffectBeacon>
272
273    <QuestEffectBeacon times=1>
274        <effects>
275            <CompleteQuest questId="quest2.1" />
276        </effects>
277        <events>
278            <execute>
279                <EventListener event="dockedA" />
280            </execute>
281        </events>
282    </QuestEffectBeacon>
283
284    <QuestEffectBeacon times=1>
285        <effects>
286            <CompleteQuest questId="quest2.2" />
287            <CompleteQuest questId="quest2" />
288        </effects>
289        <events>
290            <execute>
291                <EventListener event="joinedUnit" />
292            </execute>
293        </events>
294    </QuestEffectBeacon>
295
296    <QuestEffectBeacon times=1>
297        <effects>
298            <CompleteQuest questId="quest3" />
299        </effects>
300        <events>
301            <execute>
302                <EventListener event="waveClear1" />
303            </execute>
304        </events>
305    </QuestEffectBeacon>
306
307    <!--NOTIFICATIONS -->
308
309    <SimpleNotification broadcast="true" message="Welcome, Commander. Please report at Station A.">
310        <events>
311            <trigger>
312                <EventTrigger stayactive="true" delay=4 >
313                   <events>
314                      <trigger>
315                         <EventListener event="spawntrigger" />
316                      </trigger>
317                   </events>
318                </EventTrigger>
319            </trigger>
320        </events>
321    </SimpleNotification>
322
323    <SimpleNotification broadcast="true" message="Our enemy is set to attack us very soon.">
324        <events>
325            <trigger>
326                <EventTrigger stayactive="true" delay=8 >
327                   <events>
328                      <trigger>
329                         <EventListener event="spawntrigger" />
330                      </trigger>
331                   </events>
332                </EventTrigger>
333            </trigger>
334        </events>
335    </SimpleNotification>
336
337    <SimpleNotification broadcast="true" message="Please study your mission briefing!">
338        <events>
339            <trigger>
340                <EventTrigger stayactive="true" delay=12 >
341                   <events>
342                      <trigger>
343                         <EventListener event="spawntrigger" />
344                      </trigger>
345                   </events>
346                </EventTrigger>
347            </trigger>
348        </events>
349    </SimpleNotification>
350
351    <SimpleNotification broadcast="true" message="Welcome to Station A, Commander.">
352        <events>
353            <trigger>
354                <EventListener event="reachedA" />
355            </trigger>
356        </events>
357    </SimpleNotification>
358
359    <SimpleNotification broadcast="true" message="We've prepared a reinforced Ship for you.">
360        <events>
361            <trigger>
362                <EventTrigger stayactive="true" delay=4 >
363                   <events>
364                      <trigger>
365                         <EventListener event="reachedA" />
366                      </trigger>
367                   </events>
368                </EventTrigger>
369            </trigger>
370        </events>
371    </SimpleNotification>
372
373    <SimpleNotification broadcast="true" message="Now join our defense Team.">
374        <events>
375            <trigger>
376                <EventListener event="dockedA" />
377            </trigger>
378        </events>
379    </SimpleNotification>
380
381    <SimpleNotification broadcast="true" message="An enemy wave is approaching the shuttle!">
382        <events>
383            <trigger>
384                <EventListener event="wave1" />
385                <EventListener event="wave2" />
386                <EventListener event="wave3" />
387            </trigger>
388        </events>
389    </SimpleNotification>
390
391    <SimpleNotification broadcast="true" message="yippie ki yay motherf*cker!">
392        <events>
393            <trigger>
394                <EventListener event="attackers1" />
395                <EventListener event="attackers2" />
396                <EventListener event="attackers3" />
397            </trigger>
398        </events>
399    </SimpleNotification>
400
401    <SimpleNotification broadcast="true" message="Phew, that was close! Well done, Commmander.">
402        <events>
403            <trigger>
404                <EventListener event="waveClear1" />
405                <EventListener event="waveClear2" />
406                <EventListener event="waveClear3" />
407            </trigger>
408        </events>
409    </SimpleNotification>
410
411    <SimpleNotification broadcast="true" message="It's over... we failed. Retreat!">
412        <events>
413            <trigger>
414                <EventListener event="missionFailed" />
415            </trigger>
416        </events>
417    </SimpleNotification>
418
419    <!--STATIONS -->
420
421    <!-- (Temporary) Template for stations. Used to define common features of all Stations. -->
422    <Template name="station">
423        <Pawn mass=10000 collisionType=dynamic friction=0.01>
424          <attached>
425            <Model mesh="HydroHarvester.mesh" position="0,0,0" scale=50 />
426            <DistanceTriggerBeacon name="NPC" />
427          </attached>
428          <collisionShapes>
429            <BoxCollisionShape  position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes -->
430            <BoxCollisionShape  position="290,0,-480" halfExtents="115,100,245" yaw=-120 />
431            <BoxCollisionShape  position="290,0,480" halfExtents="115,100,245" yaw=-240 />
432            <BoxCollisionShape  position="-280,0,0" halfExtents="163,50,50" /><!-- Three lower connections -->
433            <BoxCollisionShape  position="140,0,-240" halfExtents="163,50,50" yaw=-120 />
434            <BoxCollisionShape  position="140,0,240" halfExtents="163,50,50" yaw=-240 />
435            <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" /><!-- Upper Tower -->
436            <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-120 />
437            <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-240 />
438            <BoxCollisionShape  position="0,400,0" halfExtents="43,110,26" yaw=-30 /><!-- Middle one-->
439            <BoxCollisionShape  position="-200,100,0" halfExtents="26,50,43" /><!--Three lower legs -->
440            <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=-30 />
441            <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=30 />
442            <BoxCollisionShape  position="-100,264,0" halfExtents="26,105,43" roll=-49 /><!--Three upper legs -->
443            <BoxCollisionShape  position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 />
444            <BoxCollisionShape  position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 />
445          </collisionShapes>
446      </Pawn>
447    </Template>
448
449    <!-- A, Coordinates are approx. (cos(29pi/16), sin(29pi/16), 0)*3000 -->
450    <Pawn name="statA" team=0 radarname="Station A" position="5000,-3000,0" direction="0,1,0" initialhealth=10000 maxhealth=10000>
451        <templates>
452            <Template link="station" />
453        </templates>
454        <attached>
455            <DockingTarget name="dockTargetA" />
456            <Dock position="0,0,0" active=true>
457                <animations>
458                    <MoveToDockingTarget target="dockTargetA" />
459                </animations>
460                <effects>
461                    <DockToShip target="newSpaceShip" />
462                </effects>
463                <events>
464                    <execute>
465                        <EventListener event="dockA" />
466                    </execute>
467                </events>
468                <attached>
469                    <DistanceTrigger position="0,0,0" distance="200" target="SpaceShip" beaconMode="exclude" targetname="NPC" name="dockA" />
470                    <Billboard position="0,0,0" amplitude=1 material="Flares/lensflare" colour="1,0,0.05" />
471                </attached>
472            </Dock>
473        </attached>
474    </Pawn>
475
476    <!-- B, Coordinates are approx. (-cos(29pi/16), sin(29pi/16), 0)*3000 -->
477    <Pawn name="statB" team=0 radarname="Station B" position="-5000,-3000,0" direction="0,1,0" initialhealth=10000 maxhealth=10000>
478        <templates>
479            <Template link="station" />
480        </templates>
481        <attached>
482            <DockingTarget name="dockTargetB" />
483            <Dock position="0,0,0" active=true>
484                <animations>
485                    <MoveToDockingTarget target="dockTargetB" />
486                </animations>
487                <effects>
488                    <DockToShip target="newSpaceShip" />
489                </effects>
490                <events>
491                    <execute>
492                        <EventListener event="dockB" />
493                    </execute>
494                </events>
495                <attached>
496                    <DistanceTrigger position="0,0,0" distance="200" target="SpaceShip" beaconMode="exclude" targetname="NPC" name="dockB" />
497                    <Billboard position="0,0,0" amplitude=1 material="Flares/lensflare" colour="1,0,0.05" />
498                </attached>
499            </Dock>
500        </attached>
501    </Pawn>
502
503    <!-- C -->
504    <Pawn name="statC" team=0 radarname="Station C" position="0,-2300,0" direction="0,1,0" initialhealth=10000 maxhealth=10000>
505        <templates>
506            <Template link="station" />
507        </templates>
508        <attached>
509            <DockingTarget name="dockTargetC" />
510            <Dock position="0,0,0" active=true>
511                <animations>
512                    <MoveToDockingTarget target="dockTargetC" />
513                </animations>
514                <effects>
515                    <DockToShip target="fpsMode" />
516                </effects>
517                <events>
518                    <execute>
519                        <EventListener event="dockC" />
520                    </execute>
521                </events>
522                <attached>
523                    <DistanceTrigger position="0,0,0" distance="200" target="SpaceShip" beaconMode="exclude" targetname="NPC" name="dockC" />
524                    <Billboard position="0,0,0" amplitude=1 material="Flares/lensflare" colour="1,0,0.05" />
525                </attached>
526            </Dock>
527        </attached>
528    </Pawn>
529
530    <!-- New SpaceShip as destination of dock A-->
531    <SpaceShip
532        template            = "spaceshipassff2"
533        team                = "0"
534        position            = "4100,-2100,0"
535        orientation         = "-0.14, 0.68, 0.68, 0.223"
536        health              = "400"
537        initialhealth       = "400"
538        maxhealth           = "500"
539        shieldhealth        = "80"
540        initialshieldhealth = "80"
541        maxshieldhealth     = "120"
542        shieldabsorption    = "0.8"
543        reloadrate          = "1"
544        reloadwaittime      = "1"
545        name                = "newSpaceShip"
546        radarname           = "Defender" >
547      <attached>
548        <DockingTarget name="newSpaceShip" />
549        <DistanceTriggerBeacon name="newSpaceShip" />
550      </attached>
551    </SpaceShip>
552
553    <!-- FPS Player as destination of dock C-->
554    <FpsPlayer team=0 template = "fps" rotationaxis="0,0,1" radarname = "First Person Player" position = "0,-2300,1201">
555        <attached>
556            <DockingTarget name="fpsMode" />
557            <DistanceTriggerBeacon name="fpsPlayer" />
558        </attached>
559    </FpsPlayer>
560
561    <StaticEntity position="0,-2300,1001" direction="0,0,-1" collisionType=static mass=100000 friction=0.01 >
562        <attached>
563          <Model position="0,0,0" mesh="crate.mesh" scale3D="80,80,5" />
564        </attached>
565        <collisionShapes>
566          <BoxCollisionShape position="0,0,0" halfExtents="400,400,25" />
567        </collisionShapes>
568    </StaticEntity>
569
570    <!--ELEMENTS -->
571
572    <?lua
573        dofile("includes/asteroidField.lua")
574       asteroidField(2500, 400, 0, 20, 30, 2200, 250, 0)
575    ?>
576
577    <?lua
578        dofile("includes/asteroidField.lua")
579       asteroidField(-2500, 400, 0, 20, 30, 2200, 250, 0)
580    ?>
581
582    <Planet
583        position="15000,8000,-2000"
584        scale="2000"
585        collisionType="dynamic"
586        linearDamping="0.8"
587        angularDamping="0"
588        mass="5000000"
589        pitch="0"
590        mesh="planets/muunilinst.mesh"
591        atmosphere="atmosphere1"
592        rotationaxis="1,0,0"
593        rotationrate="1.0"
594        atmospheresize="80.0f"
595        imagesize="1024.0f"
596        collisiondamage = 2
597        enablecollisiondamage = true
598      >
599      <attached>
600        <ForceField position="0,0,0" mode="sphere" diameter="4000" velocity="-500" />
601        </attached>
602          <collisionShapes>
603            <SphereCollisionShape radius="2000" position="0,0,0" />
604      </collisionShapes>
605    </Planet>
606
607    <?lua
608        dofile("includes/asteroidField.lua")
609        asteroidBelt(15000, 8000, -2000, 30, 0, 30, 20, 40, 2800, 3000, 200, 1)
610    ?>
611
612    <Planet
613        position="-1000,-20000,4000"
614        scale="3000"
615        collisionType="dynamic"
616        linearDamping="0.8"
617        angularDamping="0"
618        mass="5000000"
619        pitch="0"
620        mesh="planets/planet3.mesh"
621        atmosphere="atmosphere1"
622        rotationaxis="1,0,0"
623        rotationrate="1.0"
624        atmospheresize="80.0f"
625        imagesize="1024.0f"
626        collisiondamage = 2
627        enablecollisiondamage = true
628      >
629      <attached>
630        <ForceField position="0,0,0" mode="sphere" diameter="6000" velocity="-500" />
631        </attached>
632          <collisionShapes>
633            <SphereCollisionShape radius="3000" position="0,0,0" />
634      </collisionShapes>
635    </Planet>
636
637    <?lua
638        dofile("includes/asteroidField.lua")
639        asteroidBelt(-1000, -20000, 4000, 30, 20, 100, 20, 40, 3400, 3700, 400, 1)
640    ?>
641
642    <!-- Allies, 3000,-2000 -->
643    <?lua
644    for i = 1, allies, 1
645    do
646    x = 3000 + math.cos(2*math.pi/5*(i+1))*100
647    y = -2000 + math.sin(2*math.pi/5*(i+1))*100
648    ?>
649    <SpaceShip visible=false active=false name="allies<?lua print(k)?>" radarname="Ally" position="<?lua print(x)?>,<?lua print(y)?>,<?lua print(math.pow(-1,i)*100) ?>" lookat="0,0,0" team=0>
650        <templates>
651            <Template link="spaceshipassff2" />
652        </templates>
653        <events>
654            <visibility>
655                <EventListener event="dockedA" />
656            </visibility>
657            <activity>
658                <EventListener event="dockedA" />
659            </activity>
660        </events>
661        <attached>
662            <DistanceTriggerBeacon name="NPC" />
663        </attached>
664        <controller>
665            <WaypointPatrolController accuracy=1000 name="allyController" alertnessradius=500 team=0 active=false>
666                <waypoints>
667                    <StaticEntity position="0,0,0" />
668                </waypoints>
669                <events>
670                    <activity>
671                        <EventListener event="joinedUnit" />
672                    </activity>
673                </events>
674            </WaypointPatrolController>
675        </controller>
676    </SpaceShip>
677    <?lua end ?>
678
679    <!-- Enemies. Outer loop defines waves, inner loop defines enemies in every wave. -->
680    <?lua
681    for k = 1, waves, 1
682    do
683    ?>
684    <?lua
685    for i = 1, enemies, 1
686    do
687    x = math.cos(math.pi/8*(i+1))*1500
688    y = math.sin(math.pi/8*(i+1))*1500
689    ?>
690    <SpaceShip visible=false active=false name="attackers<?lua print(k)?>" radarname="Attacker" position="<?lua print(x)?>,<?lua print(y)?>,<?lua print(math.pow(-1,i)*250) ?>" lookat="0,0,0" team=1>
691        <templates>
692            <Template link="spaceshippirate" />
693        </templates>
694        <events>
695            <visibility>
696                <EventListener event="wave<?lua print(k)?>" />
697            </visibility>
698            <activity>
699                <EventListener event="wave<?lua print(k)?>" />
700            </activity>
701        </events>
702        <attached>
703            <DistanceTriggerBeacon name="NPC" />
704        </attached>
705        <controller>
706            <WaypointPatrolController name="attackController" accuracy=100 alertnessradius=200 team=1 active=false>
707                <waypoints>
708                    <Attacher target="transporter" deletewithparent=false />
709                </waypoints>
710                <events>
711                    <activity>
712                        <EventListener event="wave<?lua print(k)?>" />
713                    </activity>
714                </events>
715            </WaypointPatrolController>
716        </controller>
717    </SpaceShip>
718    <?lua end ?>
719    <?lua end ?>
720
721
722    <!-- Transporter, starting Point is near A, end Point near B, the circle parameters for the waypoints are: Center = (0, -887, 0), r = 2613 -->
723    <SpaceShip position="5000,-3000,0" lookat="-2494, -1667, 0" team=0 name="transporter" radarname="Shuttle">
724        <templates>
725            <Template link="spaceshipTransporter" />
726        </templates>
727        <attached>
728            <DistanceTriggerBeacon name="NPC" />
729        </attached>
730        <controller>
731            <WaypointController accuracy=10 team=0>
732                <waypoints>
733                    <!-- A to B -->
734                    <?lua
735                    max = 5
736                    for i = 1, max, 1
737                    do
738                    x = math.cos(math.pi*(i+1)/8)*5000
739                    y = -math.sin(math.pi*(i+1)/8)*700-3000
740                    ?>
741                    <Billboard position="<?lua print(x) ?>,<?lua print(y) ?>,0" amplitude=1 material="Flares/lensflare" colour="1,1,0.05"/>
742                    <?lua end ?>
743
744                    <!-- Return Point -->
745                    <Billboard position="-5000, -3000, 0" amplitude=1 material="Flares/lensflare" colour="1,1,0.05"/>
746
747                    <!-- B to A -->
748                    <?lua
749                    max = 5
750                    for i = 1, max, 1
751                    do
752                    x = math.cos(math.pi*(max+2-i)/8)*5000
753                    y = -math.sin(math.pi*(max+2-i)/8)*700-3000
754                    ?>
755                    <Billboard position="<?lua print(x) ?>,<?lua print(y) ?>,0" amplitude=1 material="Flares/lensflare" colour="1,1,0.05"/>
756                    <?lua end ?>
757
758                    <!-- Start Point -->
759                    <Billboard position="5000,-3000,0" amplitude=1 material="Flares/lensflare" colour="1,1,0.05"/>
760                </waypoints>
761            </WaypointController>
762        </controller>
763    </SpaceShip>
764
765    </Scene>
766</Level>
Note: See TracBrowser for help on using the repository browser.