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 | include("templates/spaceshipPirate.oxt") |
---|
20 | ?> |
---|
21 | |
---|
22 | <Level gametype="Mission"> |
---|
23 | <templates> |
---|
24 | <Template link=lodtemplate_default /> |
---|
25 | </templates> |
---|
26 | <?lua include("includes/notifications.oxi") ?> |
---|
27 | |
---|
28 | <NotificationQueueCEGUI |
---|
29 | name="narrative" |
---|
30 | targets="simpleNotification" |
---|
31 | size=3 |
---|
32 | displayTime=7 |
---|
33 | position="0.2, 0, 0.1, 0" |
---|
34 | fontSize="16" |
---|
35 | fontColor="0.3, 1, 0.2, 0.8" |
---|
36 | alignment="HorzCentred" |
---|
37 | displaySize="0.6, 0, 0, 0" |
---|
38 | /> |
---|
39 | |
---|
40 | <Scene |
---|
41 | ambientlight = "0.8, 0.8, 0.8" |
---|
42 | skybox = "Orxonox/Starbox" |
---|
43 | > |
---|
44 | |
---|
45 | <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" /> <!-- AlphaCentauri.ogg, Mars.ogg--> |
---|
46 | |
---|
47 | <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"/> |
---|
48 | |
---|
49 | <EventMultiTrigger name=spawntrigger> |
---|
50 | <events> |
---|
51 | <trigger> |
---|
52 | <SpawnPoint team=0 position="0,0,1" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /> |
---|
53 | </trigger> |
---|
54 | </events> |
---|
55 | </EventMultiTrigger> |
---|
56 | |
---|
57 | <SpaceShip |
---|
58 | team = 0 |
---|
59 | position = "0,0,-2500" |
---|
60 | mass = 10000 |
---|
61 | health = 100000 initialhealth=100000 maxhealth="100000" |
---|
62 | rotationaxis="0,0,1" rotationrate="4.5" velocity="0,0,30" |
---|
63 | name = "target" |
---|
64 | radarname = "Target" > |
---|
65 | <attached> |
---|
66 | <DistanceTriggerBeacon name="CargoShip" /> |
---|
67 | <Model mesh="escortShip.mesh" mass=10000 position="0,0,0" scale=100 /> |
---|
68 | </attached> |
---|
69 | <collisionShapes> |
---|
70 | <BoxCollisionShape position="0,0,0" halfExtents="300,100,200" /> <!-- laenge , dicke , breite --> |
---|
71 | <BoxCollisionShape position="-100,-50,-280" halfExtents="220,70,100" /> |
---|
72 | <BoxCollisionShape position="-100,-50,280" halfExtents="220,70,100" /> |
---|
73 | </collisionShapes> |
---|
74 | </SpaceShip> |
---|
75 | |
---|
76 | <!-- triggers when first quest is completed --> |
---|
77 | <DistanceTrigger name="passedAsteroidFieldOne" beaconMode=identify position="0,0,-3000" distance=1000 target="SpaceShip" targetname="CargoShip" /> |
---|
78 | |
---|
79 | <!-- create asteroids --> |
---|
80 | <?lua |
---|
81 | for count = 1, 30, 1 do |
---|
82 | x = math.random(-1000, 1000) |
---|
83 | y = math.random(-1000, 1000) |
---|
84 | z = 125 * count + math.random(-250, 250) |
---|
85 | vmax = 7 |
---|
86 | rx = math.random(-vmax, vmax) |
---|
87 | ry = math.random(-vmax, vmax) |
---|
88 | rz = math.random(-vmax, vmax) |
---|
89 | vx = math.random(-vmax, vmax) |
---|
90 | vy = math.random(-vmax, vmax) |
---|
91 | vz = math.random(-vmax, vmax) |
---|
92 | rr = math.random() * 10 |
---|
93 | 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=5 /> </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>") |
---|
94 | end |
---|
95 | ?> |
---|
96 | |
---|
97 | <!-- start first quest --> |
---|
98 | <QuestEffectBeacon times=1> |
---|
99 | <effects> |
---|
100 | <AddQuest questId="ProtectBoss.AsteroidField" /> |
---|
101 | </effects> |
---|
102 | <events> |
---|
103 | <execute> |
---|
104 | <EventListener event=spawntrigger /> |
---|
105 | </execute> |
---|
106 | </events> |
---|
107 | </QuestEffectBeacon> |
---|
108 | |
---|
109 | <!-- start second quest (doesn't work yet) --> |
---|
110 | <QuestEffectBeacon times=1> |
---|
111 | <effects> |
---|
112 | <CompleteQuest questId="ProtectBoss.AsteroidField" /> |
---|
113 | <AddQuest questId="ProtectBoss.PirateAttack" /> |
---|
114 | </effects> |
---|
115 | <events> |
---|
116 | <execute> |
---|
117 | <EventListener event="passedAsteroidFieldOne" /> |
---|
118 | </execute> |
---|
119 | </events> |
---|
120 | </QuestEffectBeacon> |
---|
121 | |
---|
122 | <SimpleNotification message="Protect the cargo ship! (Info: F3)" broadcast="true"> |
---|
123 | <events> |
---|
124 | <trigger> |
---|
125 | <EventListener event=spawntrigger /> |
---|
126 | </trigger> |
---|
127 | </events> |
---|
128 | </SimpleNotification> |
---|
129 | |
---|
130 | <LocalQuest id="ProtectBoss.AsteroidField"> |
---|
131 | <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="" /> |
---|
132 | <!--complete-effects> |
---|
133 | <AddQuest questId="ProtectBoss.PirateAttack" /> |
---|
134 | </complete-effects--> |
---|
135 | </LocalQuest> |
---|
136 | |
---|
137 | <LocalQuest id="ProtectBoss.PirateAttack"> |
---|
138 | <QuestDescription title="Pirate Attack" description="Protect the cargo ship from the attacking pirates!" failmessage="The pirates boarded the cargo ship!" completeMessage="" /> |
---|
139 | </LocalQuest> |
---|
140 | |
---|
141 | <SimpleNotification message="Quest 1 completed (test message)"> |
---|
142 | <events> |
---|
143 | <trigger> |
---|
144 | <EventListener event="passedAsteroidFieldOne" /> |
---|
145 | </trigger> |
---|
146 | </events> |
---|
147 | </SimpleNotification> |
---|
148 | |
---|
149 | <SpaceShip position="0,0,3500" lookat="-1300,-600,900" name="Pirate" radarname="Pirate" visible="true"> |
---|
150 | <events> |
---|
151 | <visibility> |
---|
152 | <EventListener event="passedAsteroidFieldOne" /> |
---|
153 | </visibility> |
---|
154 | </events> |
---|
155 | <templates> |
---|
156 | <Template link=spaceshippirate /> <!--spaceshipTransporter --> |
---|
157 | </templates> |
---|
158 | <controller> |
---|
159 | <WaypointPatrolController alertnessradius=3129 team=1 active=false> |
---|
160 | <waypoints> |
---|
161 | <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" /> |
---|
162 | <Model mesh="cube.mesh" scale=0 position="0,0,0" /> |
---|
163 | </waypoints> |
---|
164 | <events> |
---|
165 | <activity> |
---|
166 | <EventListener event="attack" /> <!-- activates enemies--> |
---|
167 | </activity> |
---|
168 | </events> |
---|
169 | </WaypointPatrolController> |
---|
170 | </controller> |
---|
171 | </SpaceShip> |
---|
172 | |
---|
173 | </Scene> |
---|
174 | </Level> |
---|
175 | |
---|