Changeset 10689
- Timestamp:
- Oct 25, 2015, 1:26:44 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/campaignHS15/data/levels/Campaign1.oxw
r10684 r10689 28 28 <?lua include("includes/notifications.oxi") ?> 29 29 <NotificationQueueCEGUI 30 name="narrative" 31 targets="simpleNotification" 32 size=3 33 displayTime=3.9 34 position="0.15, 0, 0.1, 0" 35 fontSize="23" 36 fontColor="0.3, 1, 0.2, 0.8" 37 alignment="HorzCentred" 38 displaySize="0.7, 0, 0, 0" 39 /> 30 name="narrative" 31 targets="simpleNotification" 32 size=3 33 displayTime=3.9 34 position="0.15, 0, 0.1, 0" 35 fontSize="23" 36 fontColor="0.3, 1, 0.2, 0.8" 37 alignment="HorzCentred" 38 displaySize="0.7, 0, 0, 0" 39 /> 40 41 <!-- GLOBAL LUA VARIABLES --> 42 <?lua 43 waves = 3 44 enemies = 5 45 ?> 40 46 41 47 <Scene … … 44 50 > 45 51 46 <SpawnPoint name=" PlayerSpawn" team=1 position="0,-50,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff2 />52 <SpawnPoint name="playerSpawn" team=1 position="0,-50,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff2 /> 47 53 48 54 <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" /> … … 58 64 </hints> 59 65 <complete-effects> 66 <!-- Quest 2 not made as of yet 60 67 <AddQuest questId="quest2" /> 61 68 <AddQuest questId="quest2.1" /> 62 69 <AddQuest questId="quest2.2" /> 63 70 <AddQuest questId="quest2.3" /> 71 --> 72 <AddQuest questId="quest3" /> 64 73 </complete-effects> 65 74 </GlobalQuest> … … 153 162 _spawntrigger 154 163 _reachedA 155 _wave<1|2|3> 164 _wave<k> 165 _killedEnemy<k>.<i> 166 _waveClear<k> 156 167 --> 157 168 … … 159 170 <events> 160 171 <trigger> 161 <EventListener event=" PlayerSpawn" />172 <EventListener event="playerSpawn" /> 162 173 </trigger> 163 174 </events> 164 175 </EventMultiTrigger> 176 177 <DistanceTrigger name="reachedA" position="2494,-1667,0" distance=200 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true /> 178 179 <EventMultiTrigger name="wave1" activations="1" stayactive="true" > 180 <events> 181 <trigger> 182 <EventListener event="reachedA" /> 183 </trigger> 184 </events> 185 </EventMultiTrigger> 186 187 <!-- Recursive helper function for the end-of-wave events. F*ck the event system, seriously. --> 188 <?lua 189 function enemyTriggerRecursor(i, k) 190 if i > 0 then 191 return [[ 192 <EventTrigger name=killedEnemy]] .. k .. [[.]] .. i .. [[ activations=1 stayactive=true delay=0.1> 193 <events> 194 <trigger> 195 <EventListener event=attackers]] .. k .. [[ /> 196 </trigger> 197 </events> 198 ]] .. enemyTriggerRecursor(i-1, k) .. [[ 199 </EventTrigger> 200 ]] 201 else return "" 202 end 203 end 204 ?> 205 <!-- Actual recursive Event(s) for the respective waves. --> 206 <?lua 207 for k = 1, waves, 1 208 do 209 print(enemyTriggerRecursor(enemies,k)) 210 ?> 211 <EventMultiTrigger name="waveClear<?lua print(k) ?>" delay=4.0> 212 <events> 213 <trigger> 214 <EventListener event="killedEnemy<?lua print(k .. [[.]] .. enemies) ?>" /> 215 </trigger> 216 </events> 217 </EventMultiTrigger> 218 <?lua end ?> 219 220 <!-- This trigger needs fixing, as endMission can only be called by a Pawn Distance Trigger. Herpaderp --> 221 <EventMultiTrigger name="missionFailed" target="Pawn" stayActive="true" delay=1.5> 222 <events> 223 <trigger> 224 <EventListener event="transporter" /> 225 </trigger> 226 </events> 227 </EventMultiTrigger> 228 229 <Script code="Mission endMission fail" onLoad="false" times="1"> 230 <events> 231 <trigger> 232 <EventListener event="missionFailed" /> 233 </trigger> 234 </events> 235 </Script> 236 237 <!--QUEST EFFECT BEACONS --> 165 238 166 239 <QuestEffectBeacon times=1> … … 175 248 </QuestEffectBeacon> 176 249 177 <DistanceTrigger name="reachedA" position="2494,-1667,0" distance=200 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true /> 178 179 <EventMultiTrigger name="wave1"> 180 <events> 181 <trigger> 250 <QuestEffectBeacon times=1> 251 <effects> 252 <CompleteQuest questId="quest1" /> 253 </effects> 254 <events> 255 <execute> 182 256 <EventListener event="reachedA" /> 183 </trigger> 184 </events> 185 </EventMultiTrigger> 257 </execute> 258 </events> 259 </QuestEffectBeacon> 260 261 <QuestEffectBeacon times=1> 262 <effects> 263 <CompleteQuest questId="quest3" /> 264 </effects> 265 <events> 266 <execute> 267 <EventListener event="waveClear1" /> 268 </execute> 269 </events> 270 </QuestEffectBeacon> 186 271 187 272 <!--NOTIFICATIONS --> … … 211 296 <EventListener event="attackers2" /> 212 297 <EventListener event="attackers3" /> 298 </trigger> 299 </events> 300 </SimpleNotification> 301 302 <SimpleNotification broadcast="true" message="Phew, that was close! Well done, Commmander."> 303 <events> 304 <trigger> 305 <EventListener event="waveClear1" /> 306 <EventListener event="waveClear2" /> 307 <EventListener event="waveClear3" /> 308 </trigger> 309 </events> 310 </SimpleNotification> 311 312 <SimpleNotification broadcast="true" message="It's over... we failed. Retreat!"> 313 <events> 314 <trigger> 315 <EventListener event="missionFailed" /> 213 316 </trigger> 214 317 </events> … … 251 354 <!-- Enemies. Outer loop defines waves, inner loop defines enemies in every wave. --> 252 355 <?lua 253 waves = 5254 356 for k = 1, waves, 1 255 357 do 256 358 ?> 257 359 <?lua 258 enemies = 5259 360 for i = 1, enemies, 1 260 361 do
Note: See TracChangeset
for help on using the changeset viewer.