Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/ProtectBoss_HS17/data/levels/ProtectBoss.oxw @ 11542

Last change on this file since 11542 was 11542, checked in by lrigoni, 6 years ago

Changes of 6.11.2017

File size: 7.7 KB
Line 
1<LevelInfo
2 name = "ProtectBoss"
3 description = "Protect a disabled cargo ship!"
4 tags = "test"
5 screenshot = "emptylevel.png"
6/>
7
8<?lua
9  include("stats.oxo")
10  include("HUDTemplates3.oxo")
11  include("templates/lodInformation.oxt")
12  include("templates/HeavyCruiser.oxt")
13?>
14
15<?lua
16  include("templates/spaceshipEscort.oxt")
17  include("templates/spaceshipAssff.oxt")
18  include("templates/endurancetest_template.oxt")
19?>
20
21<Level gametype="Mission">
22  <templates>
23    <Template link=lodtemplate_default />
24  </templates>
25  <?lua include("includes/notifications.oxi") ?>
26
27  <NotificationQueueCEGUI
28    name="narrative"
29    targets="simpleNotification"
30    size=3
31    displayTime=7
32    position="0.2, 0, 0.1, 0"
33    fontSize="16"
34    fontColor="0.3, 1, 0.2, 0.8"
35    alignment="HorzCentred"
36    displaySize="0.6, 0, 0, 0"
37  />
38
39  <Scene
40    ambientlight = "0.8, 0.8, 0.8"
41    skybox       = "Orxonox/Starbox"
42  >
43
44    <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" /> <!-- AlphaCentauri.ogg, Mars.ogg-->
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    <EventMultiTrigger name=spawntrigger>
48      <events>
49        <trigger>
50          <SpawnPoint team=0 position="0,0,1" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
51        </trigger>
52      </events>
53    </EventMultiTrigger>
54
55    <!-- Cargo ship / target -->
56    <!--MovableEntity collisionType=kinematic linearDamping=0.8 angularDamping=0 mass="100" position="0,0,-2500" rotationaxis="0,0,1" rotationrate="4.5" velocity="0,0,30" radarname="Target">
57    <attached>
58        <Model scale="<?lua print(math.random(20,70)) ?>" mesh="Transporterspaceship.mesh" shadow=false/>
59    </attached>
60    </MovableEntity-->
61
62    <SpaceShip
63        team      = 0
64        position  = "0,0,-2500"
65        mass      = 10000
66        health    = 100000 initialhealth=100000 maxhealth="100000"
67        rotationaxis="0,0,1" rotationrate="4.5" velocity="0,0,30"
68        name      = "target"
69        radarname = "Target" >
70      <attached>
71        <DistanceTriggerBeacon name="CargoShip" />
72        <Model mesh="Transporterspaceship.mesh" mass=10000 position="0,0,0" scale=50 />
73      </attached>
74      <collisionShapes><!-- TODO: Change the collision shape -->
75        <BoxCollisionShape  position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes -->
76        <BoxCollisionShape  position="290,0,-480" halfExtents="115,100,245" yaw=-120 />
77        <BoxCollisionShape  position="290,0,480" halfExtents="115,100,245" yaw=-240 />
78        <BoxCollisionShape  position="-280,0,0" halfExtents="163,50,50" /><!-- Three lower connections -->
79        <BoxCollisionShape  position="140,0,-240" halfExtents="163,50,50" yaw=-120 />
80        <BoxCollisionShape  position="140,0,240" halfExtents="163,50,50" yaw=-240 />
81        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" /><!-- Upper Tower -->
82        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-120 />
83        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-240 />
84        <BoxCollisionShape  position="0,400,0" halfExtents="43,110,26" yaw=-30 /><!-- Middle one-->
85        <BoxCollisionShape  position="-200,100,0" halfExtents="26,50,43" /><!--Three lower legs -->
86        <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=-30 />
87        <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=30 />
88        <BoxCollisionShape  position="-100,264,0" halfExtents="26,105,43" roll=-49 /><!--Three upper legs -->
89        <BoxCollisionShape  position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 />
90        <BoxCollisionShape  position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 />
91      </collisionShapes>
92    </SpaceShip>
93
94    <DistanceTrigger name="passedAsteroidFieldOne" beaconMode=identify position="0,0,3000" distance=1000 target="SpaceShip" targetname="CargoShip" />
95
96    <!--DistanceTrigger name="passedAsteroidFieldOne" position="0,0,3000" distance=1000 targetname="CargoShip" target="SpaceShip"/-->
97
98    <StaticEntity postion="0,0,3000">
99      <attached>
100        <Model mesh="cokebottle.mesh" scale=10/>
101      </attached>
102    </StaticEntity>
103
104    <QuestEffectBeacon times=1>
105      <effects>
106        <CompleteQuest questId="ProtectBoss.AsteroidField" />
107      </effects>
108      <events>
109        <execute>
110          <EventListener event="passedAsteroidFieldOne" />
111        </execute>
112      </events>
113      <attached>
114        <DistanceTrigger name="passedAsteroidFieldOne" />
115      </attached>
116    </QuestEffectBeacon>
117
118    <!-- create asteroids -->
119    <?lua
120      for count = 1, 30, 1 do
121        x = math.random(-1000, 1000)
122        y = math.random(-1000, 1000)
123        z = 125 * count + math.random(-250, 250)
124        vmax = 10
125        rx = math.random(-vmax, vmax)
126        ry = math.random(-vmax, vmax)
127        rz = math.random(-vmax, vmax)
128        vx = math.random(-vmax, vmax)
129        vy = math.random(-vmax, vmax)
130        vz = math.random(-vmax, vmax)
131        rr = math.random() * 10
132        print("<Pawn health=30 position=\"" .. x .. "," .. y .. "," .. z .. "\" direction=\"0,0,-1\" velocity=\"" .. vx .. "," .. vy .. "," .. vz .. "\"rotationaxis=\"" .. rx .. "," .. ry .. "," .. rz .. "\" rotationrate=" .. rr .. " collisionType=dynamic mass=1 name=asteroid radarname=Asteroid> <!--events> <visibility> <EventListener event=flying4 /> </visibility> </events--> <attached> <Model position=\"0,0,0\" mesh=\"ast" .. math.random(6) .. ".mesh\" scale3D=\"10,10,10\" /> </attached> <collisionShapes> <SphereCollisionShape position=\"0,0,0\" radius=4 /> </collisionShapes> <!--controller> <WaypointController team=1> </WaypointController> </controller--> <explosion> <ExplosionPart minspeed=0 maxspeed=0 effect1=\"orxonox/explosion_flash2\" effect2=\"orxonox/explosion_flame2\" /> <ExplosionPart minspeed=0 maxspeed=0 effect1=\"orxonox/explosion_shockwave2\" effect2=\"orxonox/explosion_sparks2\" /> <ExplosionPart minspeed=0 maxspeed=0 effect1=\"orxonox/explosion_streak2\" effect2=\"orxonox/explosion_afterglow\" /> </explosion> </Pawn>")
133      end
134    ?>
135
136    <QuestEffectBeacon times=1>
137      <effects>
138        <AddQuest questId="ProtectBoss.AsteroidField" />
139      </effects>
140      <events>
141        <execute>
142          <EventListener event=spawntrigger />
143        </execute>
144      </events>
145    </QuestEffectBeacon>
146
147    <SimpleNotification message="Protect the cargo ship! (Info: F3)" broadcast="true">
148        <events>
149            <trigger>
150                <EventListener event=spawntrigger />
151            </trigger>
152        </events>
153    </SimpleNotification>
154
155    <LocalQuest id="ProtectBoss.AsteroidField">
156        <QuestDescription title="Asteroid Field" description="The cargo ship in front of you is disabled and is drifting uncontrolled! Shoot the asteroids out of the way to protect it!" failmessage="The cargo ship has been hit!" completeMessage="" />
157        <complete-effects>
158            <AddQuest questId="ProtectBoss.PirateAttack" />
159        </complete-effects>
160    </LocalQuest>
161
162    <LocalQuest id="ProtectBoss.PirateAttack">
163      <QuestDescription title="Pirate Attack" description="Protect the cargo ship from the attacking pirates!" failmessage="The pirates boarded the cargo ship!" completeMessage="" />
164    </LocalQuest>
165
166    <SimpleNotification message="Quest 1 completed (test message)" broadcast = true>
167        <events>
168            <trigger>
169                <EventListener event="passedAsteroidFieldOne" />
170            </trigger>
171        </events>
172    </SimpleNotification>
173
174    <SimpleNotification message="Spawntrigger (test message)" broadcast = true>
175        <events>
176            <trigger>
177                <EventListener event="spawntrigger" />
178            </trigger>
179        </events>
180    </SimpleNotification>
181   
182  </Scene>
183</Level>
184
Note: See TracBrowser for help on using the repository browser.