- Timestamp:
- Nov 4, 2015, 10:55:50 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/campaignHS15/data/levels/Campaign1.oxw
r10758 r10766 11 11 include("templates/lodInformation.oxt") 12 12 13 include("templates/spaceshipAssff 2.oxt")13 include("templates/spaceshipAssff.oxt") 14 14 include("templates/spaceshipPirate.oxt") 15 15 include("templates/spaceshipEscort.oxt") … … 41 41 waves = 3 42 42 enemies = 5 43 allies = 5 43 allies = 3 44 45 --[[ Coordinates. NOTE: Indexing starts at 1 in lua! Don´t forget to adapt the for loops, too! ]]-- 46 cCenter = {0, 0, 0} 47 cSpawn = {0, -50, 0} 48 cUnit = {3000, -2000, 0} 49 cA = {5000, -3000, 0} 50 cB = {-5000, -3000, 0} 51 cC = {0, -2300, 0} 52 dStation = {0, 1, 0} 53 cNewShip = {4100, -2100, 0} 54 cFPSGround = {0, -2300, 1200} 55 dFPSGround = {0, 0, -1} 56 cFPS = {0, -2300, 1201} 57 cField1 = {2500, 400, 0} 58 cField2 = {-2500, 400, 0} 59 cPlanet1 = {15000, 8000, -2000} 60 cPlanet2 = {-1000, -20000, 4000} 61 rAllies = {3000, -2000} --[[ To be addressed directly, hence r ]]-- 62 63 --[[ Function to print Coordinates. Quotes not included! ]]-- 64 function printC(coord) 65 print(coord[1] .. [[,]] .. coord[2] .. [[,]] .. coord[3]) 66 end 44 67 ?> 45 68 … … 50 73 > 51 74 52 <SpawnPoint name="playerSpawn" team=0 position=" 0,-50,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />75 <SpawnPoint name="playerSpawn" team=0 position="<?lua printC(cSpawn) ?>" lookat="<?lua printC(cCenter) ?>" spawnclass=SpaceShip pawndesign=spaceshipescort /> 53 76 54 77 <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" /> 55 78 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"/>79 <Light type=directional position="<?lua printC(cCenter) ?>" 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 80 58 81 <!--QUEST DEFINITIONS--> … … 173 196 </EventMultiTrigger> 174 197 175 <DistanceTrigger name="reachedA" position=" 5000,-3000,0" distance=1000 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true />198 <DistanceTrigger name="reachedA" position="<?lua printC(cA) ?>" distance=1000 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true /> 176 199 177 200 <!-- TODO: find out how to link an event to the COMPLETION of a dock. How is this not possible?? --> … … 184 207 </EventMultiTrigger> 185 208 186 <DistanceTrigger name="joinedUnit" active=false position=" 3000,-2000,0" distance=100 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true>209 <DistanceTrigger name="joinedUnit" active=false position="<?lua printC(cUnit) ?>" distance=100 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true> 187 210 <events> 188 211 <activity> … … 192 215 </DistanceTrigger> 193 216 194 <EventMultiTrigger name="wave1" activations="1" stayactive="true"delay=4>217 <EventMultiTrigger name="wave1" activations="1" delay=4> 195 218 <events> 196 219 <trigger> … … 233 256 <?lua end ?> 234 257 258 <!-- This controls the ally AI controller so it is only active when active enemies are around! 259 TODO: Find a way to control the allies in another case (Multiple controllers are not allowed). --> 260 <EventDispatcher name="allyControllerDispatcher"> 261 <targets> 262 <EventTarget target="allyController" /> 263 </targets> 264 <events> 265 <activity> 266 <?lua 267 for k = 1, waves, 1 do 268 ?> 269 <Trigger mode=and> 270 <EventTrigger> 271 <events> 272 <trigger> 273 <EventListener event="wave<?lua print(k) ?>" /> 274 </trigger> 275 </events> 276 </EventTrigger> 277 <EventTrigger invert=true> 278 <events> 279 <trigger> 280 <EventListener event="waveClear<?lua print(k) ?>" /> 281 </trigger> 282 </events> 283 </EventTrigger> 284 </Trigger> 285 <?lua end ?> 286 </activity> 287 </events> 288 </EventDispatcher> 289 235 290 <!-- FIXME: This trigger needs fixing, as endMission can only be called by a Pawn Distance Trigger. Herpaderp. 236 291 Also, the fix proposed in MissionOne does not work anymore... --> 237 292 <EventMultiTrigger name="missionFailed" target="Pawn" stayActive="true" delay=1.5> 238 293 <events> … … 383 438 </SimpleNotification> 384 439 440 <SimpleNotification broadcast="true" message="Howdy Commander! Ready to kick alien ass?"> 441 <events> 442 <trigger> 443 <EventListener event="joinedUnit" /> 444 </trigger> 445 </events> 446 </SimpleNotification> 447 385 448 <SimpleNotification broadcast="true" message="An enemy wave is approaching the shuttle!"> 386 449 <events> … … 426 489 <Template name="station"> 427 490 <Pawn mass=10000 collisionType=dynamic friction=0.01> 428 <attached>429 <Model mesh="HydroHarvester.mesh" position="0,0,0" scale=50 />430 <DistanceTriggerBeacon name="NPC" />431 </attached>432 <collisionShapes>433 <BoxCollisionShape position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes -->434 <BoxCollisionShape position="290,0,-480" halfExtents="115,100,245" yaw=-120 />435 <BoxCollisionShape position="290,0,480" halfExtents="115,100,245" yaw=-240 />436 <BoxCollisionShape position="-280,0,0" halfExtents="163,50,50" /><!-- Three lower connections -->437 <BoxCollisionShape position="140,0,-240" halfExtents="163,50,50" yaw=-120 />438 <BoxCollisionShape position="140,0,240" halfExtents="163,50,50" yaw=-240 />439 <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" /><!-- Upper Tower -->440 <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" yaw=-120 />441 <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" yaw=-240 />442 <BoxCollisionShape position="0,400,0" halfExtents="43,110,26" yaw=-30 /><!-- Middle one-->443 <BoxCollisionShape position="-200,100,0" halfExtents="26,50,43" /><!--Three lower legs -->444 <BoxCollisionShape position="100,100,-173" halfExtents="43,50,26" yaw=-30 />445 <BoxCollisionShape position="100,100,-173" halfExtents="43,50,26" yaw=30 />446 <BoxCollisionShape position="-100,264,0" halfExtents="26,105,43" roll=-49 /><!--Three upper legs -->447 <BoxCollisionShape position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 />448 <BoxCollisionShape position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 />449 </collisionShapes>450 </Pawn>491 <attached> 492 <Model mesh="HydroHarvester.mesh" position="0,0,0" scale=50 /> 493 <DistanceTriggerBeacon name="NPC" /> 494 </attached> 495 <collisionShapes> 496 <BoxCollisionShape position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes --> 497 <BoxCollisionShape position="290,0,-480" halfExtents="115,100,245" yaw=-120 /> 498 <BoxCollisionShape position="290,0,480" halfExtents="115,100,245" yaw=-240 /> 499 <BoxCollisionShape position="-280,0,0" halfExtents="163,50,50" /><!-- Three lower connections --> 500 <BoxCollisionShape position="140,0,-240" halfExtents="163,50,50" yaw=-120 /> 501 <BoxCollisionShape position="140,0,240" halfExtents="163,50,50" yaw=-240 /> 502 <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" /><!-- Upper Tower --> 503 <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" yaw=-120 /> 504 <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" yaw=-240 /> 505 <BoxCollisionShape position="0,400,0" halfExtents="43,110,26" yaw=-30 /><!-- Middle one--> 506 <BoxCollisionShape position="-200,100,0" halfExtents="26,50,43" /><!--Three lower legs --> 507 <BoxCollisionShape position="100,100,-173" halfExtents="43,50,26" yaw=-30 /> 508 <BoxCollisionShape position="100,100,-173" halfExtents="43,50,26" yaw=30 /> 509 <BoxCollisionShape position="-100,264,0" halfExtents="26,105,43" roll=-49 /><!--Three upper legs --> 510 <BoxCollisionShape position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 /> 511 <BoxCollisionShape position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 /> 512 </collisionShapes> 513 </Pawn> 451 514 </Template> 452 515 453 516 <!-- A, Coordinates are approx. (cos(29pi/16), sin(29pi/16), 0)*3000 --> 454 <Pawn name="statA" team=0 radarname="Station A" position=" 5000,-3000,0" direction="0,1,0" initialhealth=10000 maxhealth=10000>517 <Pawn name="statA" team=0 radarname="Station A" position="<?lua printC(cA) ?>" direction="<?lua printC(dStation) ?>" initialhealth=10000 maxhealth=10000> 455 518 <templates> 456 519 <Template link="station" /> … … 479 542 480 543 <!-- B, Coordinates are approx. (-cos(29pi/16), sin(29pi/16), 0)*3000 --> 481 <Pawn name="statB" team=0 radarname="Station B" position=" -5000,-3000,0" direction="0,1,0" initialhealth=10000 maxhealth=10000>544 <Pawn name="statB" team=0 radarname="Station B" position="<?lua printC(cB) ?>" direction="<?lua printC(dStation) ?>" initialhealth=10000 maxhealth=10000> 482 545 <templates> 483 546 <Template link="station" /> … … 506 569 507 570 <!-- C --> 508 <Pawn name="statC" team=0 radarname="Station C" position=" 0,-2300,0" direction="0,1,0" initialhealth=10000 maxhealth=10000>571 <Pawn name="statC" team=0 radarname="Station C" position="<?lua printC(cC) ?>" direction="<?lua printC(dStation) ?>" initialhealth=10000 maxhealth=10000> 509 572 <templates> 510 573 <Template link="station" /> … … 534 597 <!-- New SpaceShip as destination of dock A--> 535 598 <SpaceShip 536 template = "spaceshipassff2"537 team = "0"538 position = "4100,-2100,0"539 orientation = "-0.14, 0.68, 0.68, 0.223"540 health = "400"541 initialhealth = "400"542 maxhealth = "500"543 shieldhealth = "80"544 initialshieldhealth = "80"545 maxshieldhealth = "120"546 shieldabsorption = "0.8"547 reloadrate = "1"548 reloadwaittime = "1"549 name = "newSpaceShip"550 radarname = "Defender" >551 <attached>552 <DockingTarget name="newSpaceShip" />553 <DistanceTriggerBeacon name="newSpaceShip" />554 </attached>599 template = "spaceshipassff" 600 team = "0" 601 position = "<?lua printC(cNewShip) ?>" 602 lookat = "<?lua printC(cCenter) ?>" 603 health = "400" 604 initialhealth = "400" 605 maxhealth = "500" 606 shieldhealth = "80" 607 initialshieldhealth = "80" 608 maxshieldhealth = "120" 609 shieldabsorption = "0.8" 610 reloadrate = "1" 611 reloadwaittime = "1" 612 name = "newSpaceShip" 613 radarname = "Defender" > 614 <attached> 615 <DockingTarget name="newSpaceShip" /> 616 <DistanceTriggerBeacon name="newSpaceShip" /> 617 </attached> 555 618 </SpaceShip> 556 619 557 620 <!-- FPS Player as destination of dock C--> 558 <FpsPlayer team=0 template = "fps" r otationaxis="0,0,1" radarname = "First Person Player" position = "0,-2300,1201">621 <FpsPlayer team=0 template = "fps" radarname = "First Person Player" position = "<?lua printC(cFPS) ?>"> 559 622 <attached> 560 623 <DockingTarget name="fpsMode" /> … … 563 626 </FpsPlayer> 564 627 565 <StaticEntity position=" 0,-2300,1001" direction="0,0,-1" collisionType=static mass=100000 friction=0.01 >628 <StaticEntity position="<?lua printC(cFPSGround) ?>" direction="<?lua printC(dFPSGround) ?>" collisionType=static mass=100000 friction=0.01 > 566 629 <attached> 567 <Model position="0,0,0" mesh="crate.mesh" scale3D="80,80,5" />630 <Model position="0,0,0" mesh="crate.mesh" scale3D="80,80,5" /> 568 631 </attached> 569 632 <collisionShapes> 570 <BoxCollisionShape position="0,0,0" halfExtents="400,400,25" />633 <BoxCollisionShape position="0,0,0" halfExtents="80,80,5" /> 571 634 </collisionShapes> 572 635 </StaticEntity> … … 576 639 <?lua 577 640 dofile("includes/asteroidField.lua") 578 asteroidField( 2500, 400, 0, 20, 30, 2200, 250, 0)641 asteroidField(cField1[1], cField1[2], cField1[3], 20, 30, 2200, 250, 0) 579 642 ?> 580 643 581 644 <?lua 582 645 dofile("includes/asteroidField.lua") 583 asteroidField( -2500, 400, 0, 20, 30, 2200, 250, 0)646 asteroidField(cField2[1], cField2[2], cField2[3], 20, 30, 2200, 250, 0) 584 647 ?> 585 648 586 649 <Planet 587 position=" 15000,8000,-2000"650 position="<?lua printC(cPlanet1) ?>" 588 651 scale="2000" 589 652 collisionType="dynamic" … … 611 674 <?lua 612 675 dofile("includes/asteroidField.lua") 613 asteroidBelt( 15000, 8000, -2000, 30, 0, 30, 20, 40, 2800, 3000, 200, 1)676 asteroidBelt(cPlanet1[1], cPlanet1[2], cPlanet1[3], 30, 0, 30, 20, 40, 2800, 3000, 200, 1) 614 677 ?> 615 678 616 679 <Planet 617 position=" -1000,-20000,4000"680 position="<?lua printC(cPlanet2) ?>" 618 681 scale="3000" 619 682 collisionType="dynamic" … … 641 704 <?lua 642 705 dofile("includes/asteroidField.lua") 643 asteroidBelt( -1000, -20000, 4000, 30, 20, 100, 20, 40, 3400, 3700, 400, 1)644 ?> 645 646 <!-- Allies , 3000,-2000-->706 asteroidBelt(cPlanet2[1], cPlanet2[2], cPlanet2[3], 30, 20, 100, 20, 40, 3400, 3700, 400, 1) 707 ?> 708 709 <!-- Allies --> 647 710 <?lua 648 711 for i = 1, allies, 1 649 712 do 650 x = 3000 + math.cos(2*math.pi/5*(i+1))*100651 y = -2000 + math.sin(2*math.pi/5*(i+1))*100713 x = rAllies[1] + math.cos(2*math.pi/allies*(i+1))*100 714 y = rAllies[2] + math.sin(2*math.pi/allies*(i+1))*100 652 715 ?> 653 716 <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> 654 717 <templates> 655 <Template link="spaceshipassff 2" />718 <Template link="spaceshipassff" /> 656 719 </templates> 657 720 <events> … … 667 730 </attached> 668 731 <controller> 669 <WaypointPatrolController accuracy=100 name="allyController" alertnessradius=5000 team=0 active=false> 670 <events> 671 <activity> 672 <EventListener event="joinedUnit" /> 673 </activity> 674 </events> 675 </WaypointPatrolController> 732 <!-- also see allyControllerDispatcher --> 733 <AIController name="allyController" accuracy=100 team=0 active=false /> 676 734 </controller> 677 735 </SpaceShip> … … 686 744 for i = 1, enemies, 1 687 745 do 688 x = math.cos(math.pi/( 8)*(i+1))*1500689 y = math.sin(math.pi/( 8)*(i+1))*1500746 x = math.cos(math.pi/(enemies + 3)*(i+1))*1500 747 y = math.sin(math.pi/(enemies + 3)*(i+1))*1500 690 748 ?> 691 749 <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> … … 720 778 <?lua end ?> 721 779 722 723 780 <!-- Transporter, starting Point is near A, end Point near B, the circle parameters for the waypoints are: Center = (0, -887, 0), r = 2613 --> 724 <SpaceShip position=" 5000,-3000,0" lookat="-2494, -1667, 0" team=0 name="transporter" radarname="Shuttle">781 <SpaceShip position="<?lua printC(cA) ?>" lookat="<?lua printC(cB) ?>" team=0 name="transporter" radarname="Shuttle"> 725 782 <templates> 726 783 <Template link="spaceshipTransporter" /> … … 744 801 745 802 <!-- Return Point --> 746 <Billboard position=" -5000, -3000, 0" amplitude=1 material="Flares/lensflare" colour="1,1,0.05"/>803 <Billboard position="<?lua printC(cB) ?>" amplitude=1 material="Flares/lensflare" colour="1,1,0.05"/> 747 804 748 805 <!-- B to A --> … … 758 815 759 816 <!-- Start Point --> 760 <Billboard position=" 5000,-3000,0" amplitude=1 material="Flares/lensflare" colour="1,1,0.05"/>817 <Billboard position="<?lua printC(cA) ?>" amplitude=1 material="Flares/lensflare" colour="1,1,0.05"/> 761 818 </waypoints> 762 819 </WaypointController>
Note: See TracChangeset
for help on using the changeset viewer.