Changeset 10887
- Timestamp:
- Nov 29, 2015, 6:07:43 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/campaignHS15/data/levels/shuttleRetaliation.oxw
r10841 r10887 42 42 <?lua 43 43 44 units = 1 44 enemies = 4 45 allies = 4 46 47 radSector = 12000 45 48 46 49 --[[ Coordinates in (y,z,x). NOTE: Indexing starts at 1 in lua! Don´t forget to adapt the for loops, too! ]]-- 47 50 cCenter = {0, 0, 0} 48 cSpawn = {-2000, 2000, 2000} 49 cSector = {2000, 2000, 2000} 50 cBeacon = {1500, 1500, 1500} 51 52 cAlly1 = {-100, 0, 0} 53 cEnemy1 = {1000, 0, 0} 51 cSpawn = {1500, -2000, 900} 52 cSector = {-15000, -5500, -9000} 53 cSectorEntry = {-4710, -5500, -2826} 54 cPathToEntry = {{0, -2000, 0}} 55 cBeacon = {-6500, -5500, -4400} 56 cAllyWait = cBeacon 57 58 cAlly = cSpawn 59 cEnemy = {-9600, -5500, -6000} 60 61 rSection= {0, -200, 0} 62 rWingman1 = {0, -100, 100} 63 rWingman2 = {0, -100, -100} 54 64 55 65 cPlanet1 = {-9000, -8000, 14000} … … 65 75 function printC(coord) 66 76 print(coord[1] .. [[,]] .. coord[2] .. [[,]] .. coord[3]) 77 end 78 79 --[[ Function to add Coordinates.]]-- 80 function addC(coord1, coord2) 81 return {coord1[1]+coord2[1], coord1[2]+coord2[2], coord1[3]+coord2[3]} 67 82 end 68 83 ?> … … 74 89 > 75 90 76 <TeamSpawnPoint name="playerSpawn" team=0 position="<?lua printC(cSpawn) ?>" lookat="<?lua printC(cCenter) ?>" spawnclass=SpaceShip pawndesign=spaceshipescort />77 78 91 <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" /> 79 92 80 <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"/> 93 <Light type=directional position="<?lua printC(cSpawn) ?>" 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"/> 94 95 <!--SPAWNING--> 96 97 <Template name=commander> 98 <SpaceShip 99 template = "spaceshipassff" 100 team = "0" 101 health = "800" 102 initialhealth = "800" 103 maxhealth = "1500" 104 shieldhealth = "80" 105 initialshieldhealth = "80" 106 maxshieldhealth = "120" 107 shieldabsorption = "0.8" 108 reloadrate = "1" 109 reloadwaittime = "1" 110 name = "commander" 111 radarname = "Commander" 112 > 113 <attached> 114 <DistanceTriggerBeacon name="Commander" /> 115 </attached> 116 </SpaceShip> 117 </Template> 118 119 <Template name=ally> 120 <SpaceShip 121 template = "spaceshipassff" 122 team = "0" 123 radarname = "Ally" 124 lookat = "<?lua printC(cPathToEntry[1]) ?>" 125 > 126 <attached> 127 <DistanceTriggerBeacon name="Ally" /> 128 </attached> 129 </SpaceShip> 130 </Template> 131 132 <Template name=enemy> 133 <SpaceShip 134 template = "spaceshippirate" 135 team = "1" 136 radarname = "Invader" 137 lookat = "<?lua printC(cBeacon) ?>" 138 active = false 139 visible = false 140 > 141 <attached> 142 <DistanceTriggerBeacon name="Enemy" /> 143 </attached> 144 </SpaceShip> 145 </Template> 146 147 <TeamSpawnPoint active=false name="playerSpawn" team=0 position="<?lua printC(cSpawn) ?>" lookat="<?lua printC(cPathToEntry[1]) ?>" spawnclass=SpaceShip pawndesign=commander> 148 <events> 149 <activity> 150 <EventTrigger invert=true> 151 <events> 152 <trigger> 153 <EventListener event="reachedSector" /> 154 </trigger> 155 </events> 156 </EventTrigger> 157 </activity> 158 </events> 159 </TeamSpawnPoint> 160 161 <TeamSpawnPoint active=false name="altSpawn" team=0 position="<?lua printC(cBeacon) ?>" lookat="<?lua printC(cSector) ?>" spawnclass=SpaceShip pawndesign=commander> 162 <events> 163 <activity> 164 <EventListener event="reachedSector" /> 165 </activity> 166 </events> 167 </TeamSpawnPoint> 81 168 82 169 <!--QUEST DEFINITIONS--> 83 170 84 171 <GlobalQuest id="quest1"> 85 <QuestDescription title="Enter Sector 5C" description="It is time to retaliate against the aggressors. Get back to Sector 5C to kill every last one of them! " failMessage="" completeMessage="" />172 <QuestDescription title="Enter Sector 5C" description="It is time to retaliate against the aggressors. Get back to Sector 5C to kill every last one of them! We have you covered with <?lua print(allies) ?> of our finest Divisions. They will guide, help and protect you if necessary." failMessage="" completeMessage="" /> 86 173 <hints> 174 <QuestHint id="quest1hint1"> 175 <QuestDescription title="Markings" description="We have marked the bounds of Sector 5C in red lights, you can follow the green trail to get there." /> 176 </QuestHint> 87 177 </hints> 88 <complete-effects>89 <AddQuest questId="quest2" />90 </complete-effects>91 178 </GlobalQuest> 92 179 93 180 <GlobalQuest id="quest2"> 94 <QuestDescription title="Find them" description="It seems they have hid en themselves, that is, their whole civilization, in fear of retaliation. Our scientists presume some cloaking technology to be in use. Look out for a way to make the aggressors visible!" failMessage="" completeMessage="" />181 <QuestDescription title="Find them" description="It seems they have hidden themselves, that is, their whole civilization, in fear of retaliation. Our scientists presume some cloaking technology to be in use. Look out for a way to make the aggressors visible!" failMessage="" completeMessage="" /> 95 182 <hints> 96 183 <QuestHint id="quest2hint1"> 97 <QuestDescription title="The detector beacon" description="Our scientists claim cloaking is generally toggled by a visible Switch called a detector beacon. Try to find a bright light in your Area and approach it " />184 <QuestDescription title="The detector beacon" description="Our scientists claim cloaking is generally toggled by a visible Switch called a detector beacon. Try to find a bright light in your Area and approach it!" /> 98 185 </QuestHint> 99 186 </hints> 100 <complete-effects>101 <AddQuest questId="quest3" />102 </complete-effects>103 187 </GlobalQuest> 104 188 … … 109 193 <complete-effects> 110 194 <AddQuest questId="quest4" /> 195 <AddQuest questId="quest4.1" /> 196 <AddQuest questId="quest4.2" /> 197 <AddQuestHint hintId="quest4.1hint1" /> 198 <AddQuestHint hintId="quest4.2hint1" /> 111 199 </complete-effects> 112 200 </GlobalQuest> 113 201 114 202 <GlobalQuest id="quest4"> 115 <QuestDescription title="D estroy their civilisation" description="You have successfully uncovered their civilization and home planet, and it is much worse than we thought... they came prepared! You have to fight their army to fulfill your mission." failMessage="" completeMessage="" />203 <QuestDescription title="Do the right thing" description="The aggressors have surrendered and seem to have had good reasons for their actions. Yet they did not talk to us beforehand and tried to kill us. What will you do?" failMessage="" completeMessage="" /> 116 204 <hints> 117 205 </hints> 206 <subquests> 207 <GlobalQuest id="quest4.1"> 208 <QuestDescription title="> Destroy their civilisation" description="Even if they had reasons, they are still murderers and can not be trusted anymore. This whole thing might even be a setup... We need to kill them and destroy their planet!" failMessage="" completeMessage="" /> 209 <hints> 210 <QuestHint id="quest4.1hint1"> 211 <QuestDescription title="Choosing" description="To make this choice, kill one of the remaining enemy ships. The divisions will follow your decision." /> 212 </QuestHint> 213 </hints> 214 </GlobalQuest> 215 <GlobalQuest id="quest4.2"> 216 <QuestDescription title="> Spare them and leave" description="Military tension arising from a missunderstanding is no valid reasoning for a genocide. Nothing is. We should leave and talk this out later." failMessage="" completeMessage="" /> 217 <hints> 218 <QuestHint id="quest4.2hint1"> 219 <QuestDescription title="Choosing" description="To make this choice, fly away from the remaining enemy ships. The divisions will follow your decision." /> 220 </QuestHint> 221 </hints> 222 </GlobalQuest> 223 </subquests> 118 224 </GlobalQuest> 119 225 … … 131 237 </EventMultiTrigger> 132 238 133 <DistanceTrigger name="reachedSector" position="<?lua printC(cSector) ?>" distance= 1000 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true />134 135 <EventMultiTrigger name=" hintBeacon">136 <events> 137 <trigger> 138 <EventTrigger stayactive="true" delay= 90 >239 <DistanceTrigger name="reachedSector" position="<?lua printC(cSector) ?>" distance="<?lua print(radSector) ?>" target="SpaceShip" beaconMode="identify" targetname="Commander" stayactive=true /> 240 241 <EventMultiTrigger name="addQuest2"> 242 <events> 243 <trigger> 244 <EventTrigger stayactive="true" delay=10 > 139 245 <events> 140 246 <trigger> … … 147 253 </EventMultiTrigger> 148 254 149 <DistanceTrigger name="cloakBeacon" position="<?lua printC(cBeacon) ?>" distance=100 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true /> 255 <DistanceTrigger name="alliesReachedWait" position="<?lua printC(cAllyWait) ?>" distance="1000" target="SpaceShip" beaconMode="identify" targetname="Ally" stayactive=true /> 256 257 <!-- So the allies stall when they reached their position for negociation and don´t fire away... --> 258 259 <EventDispatcher name="allyControllerDispatcher"> 260 <targets> 261 <EventTarget target="allyController" /> 262 </targets> 263 <events> 264 <activity> 265 <Trigger mode=or> 266 <EventTrigger invert=true> 267 <events> 268 <trigger> 269 <EventListener event="alliesReachedWait" /> 270 </trigger> 271 </events> 272 </EventTrigger> 273 <EventTrigger> 274 <events> 275 <trigger> 276 <EventListener event="noMercy" /> 277 </trigger> 278 </events> 279 </EventTrigger> 280 <Trigger mode=and> 281 <EventTrigger> 282 <events> 283 <trigger> 284 <EventListener event="fightBegun" /> 285 </trigger> 286 </events> 287 </EventTrigger> 288 <EventTrigger invert=true> 289 <events> 290 <trigger> 291 <EventListener event="oneUnitLeft" /> 292 </trigger> 293 </events> 294 </EventTrigger> 295 </Trigger> 296 </Trigger> 297 </activity> 298 </events> 299 </EventDispatcher> 300 301 <EventMultiTrigger name="hintBeacon"> 302 <events> 303 <trigger> 304 <EventTrigger stayactive="true" delay=70 > 305 <events> 306 <trigger> 307 <EventListener event="reachedSector" /> 308 </trigger> 309 </events> 310 </EventTrigger> 311 </trigger> 312 </events> 313 </EventMultiTrigger> 314 315 <DistanceTrigger name="cloakBeacon" position="<?lua printC(cBeacon) ?>" distance=100 target="SpaceShip" beaconMode="identify" targetname="Commander" stayactive=true /> 316 317 <EventMultiTrigger name="fightBegun" stayactive=true> 318 <events> 319 <trigger> 320 <EventTrigger stayactive="true" delay=12> 321 <events> 322 <trigger> 323 <EventListener event="cloakBeacon" /> 324 </trigger> 325 </events> 326 </EventTrigger> 327 </trigger> 328 </events> 329 </EventMultiTrigger> 330 331 <EventDispatcher name="enemyControllerDispatcher"> 332 <targets> 333 <EventTarget target="enemyController" /> 334 </targets> 335 <events> 336 <activity> 337 <Trigger mode=and> 338 <EventTrigger> 339 <events> 340 <trigger> 341 <EventListener event="fightBegun" /> 342 </trigger> 343 </events> 344 </EventTrigger> 345 <EventTrigger invert=true> 346 <events> 347 <trigger> 348 <EventListener event="oneUnitLeft" /> 349 </trigger> 350 </events> 351 </EventTrigger> 352 </Trigger> 353 </activity> 354 </events> 355 </EventDispatcher> 356 357 <EventMultiTrigger name="noMercy" stayactive=true> 358 <events> 359 <trigger> 360 <Trigger mode=or> 361 <?lua 362 for i = 1, enemies, 1 363 do 364 ?> 365 <EventTrigger active=false> 366 <events> 367 <activity> 368 <EventTrigger> 369 <events> 370 <trigger> 371 <EventListener event="oneUnitLeft" /> 372 </trigger> 373 </events> 374 </EventTrigger> 375 </activity> 376 <trigger> 377 <EventListener event="enemy<?lua print(i) ?>" /> <!--TODO: trigger this with something that comes up when an enemy dies WITHOUT breaking the rest --> 378 </trigger> 379 </events> 380 </EventTrigger> 381 <?lua end ?> 382 </Trigger> 383 </trigger> 384 </events> 385 </EventMultiTrigger> 386 387 <!-- Recursive helper function for the event at the "end" of a Unit.--> 388 <?lua 389 function enemyTriggerRecursor(i, k) 390 if i > 0 then 391 return [[ 392 <EventTrigger name=killedEnemy]] .. ((k-1)*4+i) .. [[ activations=1 stayactive=true delay=0.1> 393 <events> 394 <trigger> 395 <EventListener event=enemy]] .. k .. [[ /> 396 </trigger> 397 </events> 398 ]] .. enemyTriggerRecursor(i-1, k) .. [[ 399 </EventTrigger> 400 ]] 401 else return "" 402 end 403 end 404 ?> 405 <!-- Actual recursive Event(s) for the respective Units. (packs of 4 Enemies that is!) --> 406 <?lua 407 for k = 1, enemies, 1 408 do 409 print(enemyTriggerRecursor(4,k)) 410 ?> 411 <EventMultiTrigger name="unit<?lua print(k) ?>Down" delay=0.1 stayactive=true> 412 <events> 413 <trigger> 414 <EventListener event="killedEnemy<?lua print(k*4) ?>" /> 415 </trigger> 416 </events> 417 </EventMultiTrigger> 418 <?lua end ?> 419 420 <EventMultiTrigger name="oneUnitLeft" stayactive=true> 421 <events> 422 <trigger> 423 <Trigger mode=or> 424 <?lua 425 for k = 1, enemies, 1 426 do 427 ?> 428 <Trigger mode=and> 429 <EventTrigger invert=true> 430 <events> 431 <trigger> 432 <EventListener event="unit<?lua print(k) ?>Down" /> 433 </trigger> 434 </events> 435 </EventTrigger> 436 <?lua 437 for i = 1, enemies, 1 438 do 439 if not (i == k) then 440 ?> 441 <EventTrigger> 442 <events> 443 <trigger> 444 <EventListener event="unit<?lua print(i) ?>Down" /> 445 </trigger> 446 </events> 447 </EventTrigger> 448 <?lua end end ?> 449 </Trigger> 450 <?lua end ?> 451 </Trigger> 452 </trigger> 453 </events> 454 </EventMultiTrigger> 455 456 <EventMultiTrigger name="AllUnitsDown" stayactive=true> 457 <events> 458 <trigger> 459 <Trigger mode=and> 460 <?lua 461 for k = 1, enemies, 1 462 do 463 ?> 464 <EventTrigger> 465 <events> 466 <trigger> 467 <EventListener event="unit<?lua print(i) ?>Down" /> 468 </trigger> 469 </events> 470 </EventTrigger> 471 <?lua end ?> 472 </Trigger> 473 </trigger> 474 </events> 475 </EventMultiTrigger> 150 476 151 477 <!--TODO: Complete the DistanceTriggers for completing/succeeding correctly! --> … … 188 514 <effects> 189 515 <AddQuest questId="quest1" /> 516 <AddQuestHint HintId="quest1hint1" /> 190 517 </effects> 191 518 <events> … … 209 536 <QuestEffectBeacon times=1> 210 537 <effects> 211 <AddQuestHint hintId="quest2hint2" /> 538 <AddQuest questId="quest2" /> 539 </effects> 540 <events> 541 <execute> 542 <EventListener event="addQuest2" /> 543 </execute> 544 </events> 545 </QuestEffectBeacon> 546 547 <QuestEffectBeacon times=1> 548 <effects> 549 <AddQuestHint hintId="quest2hint1 550 " /> 212 551 </effects> 213 552 <events> … … 228 567 </events> 229 568 </QuestEffectBeacon> 569 570 <QuestEffectBeacon times=1> 571 <effects> 572 <AddQuest questId="quest3" /> 573 </effects> 574 <events> 575 <execute> 576 <EventListener event="fightBegun" /> 577 </execute> 578 </events> 579 </QuestEffectBeacon> 580 581 <QuestEffectBeacon times=1> 582 <effects> 583 <CompleteQuest questId="quest3" /> 584 </effects> 585 <events> 586 <execute> 587 <EventListener event="oneUnitLeft" /> 588 </execute> 589 </events> 590 </QuestEffectBeacon> 591 592 <!--TODO: Include planet destruction and quitting --> 593 594 <QuestEffectBeacon times=1> 595 <effects> 596 <CompleteQuest questId="quest4" /> 597 </effects> 598 <events> 599 <execute> 600 <EventListener event="enemyAllGone" /> 601 </execute> 602 </events> 603 </QuestEffectBeacon> 604 230 605 231 606 <!--NOTIFICATIONS --> … … 273 648 </SimpleNotification> 274 649 275 650 <SimpleNotification broadcast="true" message="Stick to your objective, Commander. This is war."> 276 651 <events> 277 652 <trigger> … … 287 662 </SimpleNotification> 288 663 289 <!--SHIPS --> 290 291 <!--Allied units--> 292 293 294 295 <SpaceShip position="<?lua printC(cAlly1) ?>" lookat="0,0,0" name="leader1"> 296 <templates> 297 <Template link=spaceshipassff /> 298 </templates> 299 <controller> 300 <DivisionController team=0 formationMode="DIAMOND" action="FIGHT"> 301 </DivisionController> 302 </controller> 303 </SpaceShip> 304 305 <SpaceShip position="100 ,0,100" lookat="0,0,0"> 306 <templates> 307 <Template link=spaceshipassff /> 308 </templates> 309 <controller> 310 <WingmanController team=0> 311 </WingmanController> 312 </controller> 313 </SpaceShip> 314 315 <SpaceShip position="0, -100,0" lookat="0,0,0"> 316 <templates> 317 <Template link=spaceshipassff /> 318 </templates> 319 <controller> 320 <WingmanController team=0> 321 </WingmanController> 322 </controller> 323 </SpaceShip> 324 325 <SpaceShip position="-100, 0, 100" lookat="0,0,0"> 326 <templates> 327 <Template link=spaceshipassff /> 328 </templates> 329 <controller> 330 <SectionController team=0> 331 </SectionController> 332 </controller> 333 </SpaceShip> 334 335 336 337 <!-- Enemy Units --> 338 664 <SimpleNotification broadcast="true" message="Huh?! The sector is empty! where are they hiding?"> 665 <events> 666 <trigger> 667 <EventTrigger stayactive="true" delay=2 > 668 <events> 669 <trigger> 670 <EventListener event="reachedSector" /> 671 </trigger> 672 </events> 673 </EventTrigger> 674 </trigger> 675 </events> 676 </SimpleNotification> 677 678 <SimpleNotification broadcast="true" message="They must be cloaking themselves! But we'll figure it out..."> 679 <events> 680 <trigger> 681 <EventTrigger stayactive="true" delay=6 > 682 <events> 683 <trigger> 684 <EventListener event="reachedSector" /> 685 </trigger> 686 </events> 687 </EventTrigger> 688 </trigger> 689 </events> 690 </SimpleNotification> 691 692 <SimpleNotification broadcast="true" message="Got it! Look out for a bright light and touch it!"> 693 <events> 694 <trigger> 695 <EventListener event="addQuest2" /> 696 </trigger> 697 </events> 698 </SimpleNotification> 699 700 <SimpleNotification broadcast="true" message="Divisions are standing by, Sir."> 701 <events> 702 <trigger> 703 <EventListener event="alliesReachedWait" /> 704 </trigger> 705 </events> 706 </SimpleNotification> 707 708 <SimpleNotification broadcast="true" message="Woah! what the hell! they boobytrapped us!"> 709 <events> 710 <trigger> 711 <EventListener event="cloakBeacon" /> 712 </trigger> 713 </events> 714 </SimpleNotification> 715 716 <SimpleNotification broadcast="true" message="Greetings, Humans. Are you here to resign to your menace and make amends?"> 717 <events> 718 <trigger> 719 <EventTrigger stayactive="true" delay=4 > 720 <events> 721 <trigger> 722 <EventListener event="cloakBeacon" /> 723 </trigger> 724 </events> 725 </EventTrigger> 726 </trigger> 727 </events> 728 </SimpleNotification> 729 730 <SimpleNotification broadcast="true" message="Menace? What is he on about, General?"> 731 <events> 732 <trigger> 733 <EventTrigger stayactive="true" delay=8 > 734 <events> 735 <trigger> 736 <EventListener event="cloakBeacon" /> 737 </trigger> 738 </events> 739 </EventTrigger> 740 </trigger> 741 </events> 742 </SimpleNotification> 743 744 <SimpleNotification broadcast="true" message="None of your concern, Commander. Launch the attack!"> 745 <events> 746 <trigger> 747 <EventTrigger stayactive="true" delay=12 > 748 <events> 749 <trigger> 750 <EventListener event="cloakBeacon" /> 751 </trigger> 752 </events> 753 </EventTrigger> 754 </trigger> 755 </events> 756 </SimpleNotification> 757 758 <SimpleNotification broadcast="true" message="Unit 1 down!"> 759 <events> 760 <trigger> 761 <EventListener event="unit1Down" /> 762 </trigger> 763 </events> 764 </SimpleNotification> 765 766 <SimpleNotification broadcast="true" message="Unit 2 down!"> 767 <events> 768 <trigger> 769 <EventListener event="unit2Down" /> 770 </trigger> 771 </events> 772 </SimpleNotification> 773 774 <SimpleNotification broadcast="true" message="Unit 3 down!"> 775 <events> 776 <trigger> 777 <EventListener event="unit3Down" /> 778 </trigger> 779 </events> 780 </SimpleNotification> 781 782 <SimpleNotification broadcast="true" message="Unit 4 down!"> 783 <events> 784 <trigger> 785 <EventListener event="unit4Down" /> 786 </trigger> 787 </events> 788 </SimpleNotification> 789 790 <SimpleNotification broadcast="true" message="Please! No More! We surrender!"> 791 <events> 792 <trigger> 793 <EventListener event="oneUnitLeft" /> 794 </trigger> 795 </events> 796 </SimpleNotification> 797 798 <SimpleNotification broadcast="true" message="Well done, Commander. You got rid of the alien scum."> 799 <events> 800 <trigger> 801 <EventListener event="AllUnitsDown" /> 802 </trigger> 803 </events> 804 </SimpleNotification> 805 806 <SimpleNotification broadcast="true" message="Roger that, Commander. We kill them."> 807 <events> 808 <trigger> 809 <EventListener event="noMercy" /> 810 </trigger> 811 </events> 812 </SimpleNotification> 813 814 <!--ELEMENTS --> 815 816 <!-- Billboard Path to Sector 5C. Height changes in an atan shape --> 339 817 340 818 <?lua 341 for k = 1, units, 1819 for i = 1, 11, 1 342 820 do 343 x = math.cos(math.pi/(2*units - 2)*k)*1500 344 y = math.sin(math.pi/(2*units - 2)*k)*1500 821 heightNow = cPathToEntry[1][2] - (cPathToEntry[1][2]-cSectorEntry[2])*(math.atan(-1.6+0.3*i) + 1)/2 822 cBillNow = {(cSectorEntry[1]-cPathToEntry[1][1])*i/12, heightNow, (cSectorEntry[3]-cPathToEntry[1][3])*i/12} 823 cPathToEntry[i+1] = cBillNow 345 824 ?> 346 347 <SpaceShip team=1 position="<?lua printC(cEnemy1) ?>" lookat="0,0,0" name="enemy<?lua print(k) ?>"> 348 <templates> 349 <Template link=spaceshipassff /> 350 </templates> 351 <controller> 352 <DivisionController team=1 formationMode="DIAMOND" action="FIGHT"> 353 </DivisionController> 354 </controller> 355 </SpaceShip> 356 357 <SpaceShip team=1 position="100 ,0,100" lookat="0,0,0" name="enemy<?lua print(k) ?>"> 358 <templates> 359 <Template link=spaceshipassff /> 360 </templates> 361 <controller> 362 <WingmanController team=1> 363 </WingmanController> 364 </controller> 365 </SpaceShip> 366 367 <SpaceShip team=1 position="0, -100,0" lookat="0,0,0" name="enemy<?lua print(k) ?>"> 368 <templates> 369 <Template link=spaceshipassff /> 370 </templates> 371 <controller> 372 <WingmanController team=1> 373 </WingmanController> 374 </controller> 375 </SpaceShip> 376 377 <SpaceShip team=1 position="-100, 0, 100" lookat="0,0,0" name="enemy<?lua print(k) ?>"> 378 <templates> 379 <Template link=spaceshipassff /> 380 </templates> 381 <controller> 382 <SectionController team=1> 383 </SectionController> 384 </controller> 385 </SpaceShip> 386 825 <Billboard position="<?lua printC(cBillNow) ?>" scale=2 material="Flares/ringflare" colour="0.2,0.9,0.2"/> 826 <?lua 827 end 828 cPathToEntry[13] = cSectorEntry 829 ?> 830 831 <Billboard position="<?lua printC(cSectorEntry) ?>" scale=5 material="Flares/ringflare" colour="0.2,0.9,0.2"/> 832 833 <!-- Circular Billboard Ring around Sector 5C --> 834 835 <?lua 836 for i = 1, 64, 1 837 do 838 rBillboard = {math.sin(i*math.pi/32)*radSector, 0, math.cos(i*math.pi/32)*radSector} 839 cBillNow = addC(cSector,rBillboard) 840 ?> 841 <Billboard position="<?lua printC(cBillNow) ?>" scale=10 material="Flares/lensflare" colour="1,0.2,0.2"/> 387 842 <?lua end ?> 388 389 <!--ELEMENTS --> 843 844 <!-- Cloaking Beacon --> 845 846 <BlinkingBillboard visible=false active=false scale=2 position="<?lua printC(cBeacon) ?>" material="Flares/lensflare" frequency=1 amplitude=3 colour="0.4,0.4,1"> 847 <events> 848 <activity> 849 <EventListener event="addQuest2" /> 850 </activity> 851 <visibility> 852 <EventListener event="addQuest2" /> 853 </visibility> 854 </events> 855 </BlinkingBillboard> 390 856 391 857 <!-- Asteroids you have to fly through to get to the EnemyBase --> 392 858 393 859 <?lua 394 860 dofile("includes/asteroidField.lua") 395 861 asteroidField(cField1[1], cField1[2], cField1[3], 20, 30, 4500, 500, 0) 396 ?> 862 ?> 397 863 398 864 <!-- Other Asteroid-Fields --> … … 401 867 dofile("includes/asteroidField.lua") 402 868 asteroidField(cField2[1], cField2[2], cField2[3], 20, 30, 4500, 500, 0) 403 ?> 869 ?> 404 870 405 871 <!-- Planets --> … … 453 919 collisiondamage = 2 454 920 enablecollisiondamage = true 455 visible=true456 active=true921 visible=true 922 active=true 457 923 > 458 924 <attached> … … 469 935 ?> 470 936 471 <!-- EnemyPlanet (s)-->937 <!-- EnemyPlanet --> 472 938 473 939 <Planet … … 487 953 collisiondamage = 2 488 954 enablecollisiondamage = true 489 visible=true490 active=true491 492 <attached>493 <ForceField position="0,0,0" mode="sphere" diameter="10000" velocity="-500" />955 visible=false 956 active=false 957 > 958 <attached> 959 <ForceField position="0,0,0" mode="sphere" diameter="10000" velocity="-500" /> 494 960 </attached> 495 <collisionShapes> 961 <events> 962 <activity> 963 <EventListener event="cloakBeacon" /> 964 </activity> 965 <visibility> 966 <EventListener event="cloakBeacon" /> 967 </visibility> 968 </events> 969 <collisionShapes> 496 970 <SphereCollisionShape radius="5000" position="0,0,0" /> 497 </collisionShapes>971 </collisionShapes> 498 972 </Planet> 973 974 <!-- Pawn that represents the planet during destruction --> 975 976 <Pawn active=false team=1 initialhealth=500 health=500 maxhealth=500 position="<?lua printC(cEnemyBasePlanet) ?>" radarname="Enemy Home Planet" name="enemyPlanet"> 977 <events> 978 <activity> 979 <EventListener event="oneUnitLeft" /> 980 </activity> 981 </events> 982 <collisionShapes> 983 <SphereCollisionShape radius="6000" position="0,0,0" /> 984 </collisionShapes> 985 </Pawn> 986 987 <!--SHIPS --> 988 989 <!--Allied units--> 990 991 <?lua 992 for i = 1, allies, 1 993 do 994 rUnit = {-math.sin(math.pi*((i-1/2)/allies))*125, math.pow(-1,i)*80, math.cos(math.pi*((i-1/2)/allies))*800} 995 cAllyNow = addC(cAlly,rUnit) 996 ?> 997 998 <SpaceShip health=600 initialhealth=600 maxhealth=600 position="<?lua printC(cAllyNow) ?>" name="ally<?lua print(i) ?>.D"> 999 <templates> 1000 <Template link=ally /> 1001 </templates> 1002 <controller> 1003 <DivisionController name="allyController" team=0 formationMode="diamond" spread=100> 1004 <actionpoints> 1005 <?lua 1006 for i = 1, 13, 1 1007 do 1008 ?> 1009 <Actionpoint position="<?lua printC(addC(cPathToEntry[i], rUnit)) ?>" action="fly" /> 1010 <?lua end ?> 1011 </actionpoints> 1012 </DivisionController> 1013 </controller> 1014 </SpaceShip> 1015 1016 <SpaceShip health=600 initialhealth=600 maxhealth=600 position="<?lua printC(addC(cAllyNow,rSection)) ?>" lookat="0,0,0" name="ally<?lua print(i) ?>.S"> 1017 <templates> 1018 <Template link=ally /> 1019 </templates> 1020 <controller> 1021 <SectionController name="allyController" team=0> 1022 </SectionController> 1023 </controller> 1024 </SpaceShip> 1025 1026 <SpaceShip health=600 initialhealth=600 maxhealth=600 position="<?lua printC(addC(cAllyNow,rWingman1)) ?>" lookat="0,0,0" name="ally<?lua print(i) ?>.W1"> 1027 <templates> 1028 <Template link=ally /> 1029 </templates> 1030 <controller> 1031 <WingmanController name="allyController" team=0> 1032 </WingmanController> 1033 </controller> 1034 </SpaceShip> 1035 1036 <SpaceShip health=600 initialhealth=600 maxhealth=600 position="<?lua printC(addC(cAllyNow,rWingman2)) ?>" lookat="0,0,0" name="ally<?lua print(i) ?>.W2"> 1037 <templates> 1038 <Template link=ally /> 1039 </templates> 1040 <controller> 1041 <WingmanController name="allyController" team=0> 1042 </WingmanController> 1043 </controller> 1044 </SpaceShip> 1045 1046 <?lua end ?> 1047 1048 <!-- Enemy Units --> 1049 1050 <?lua 1051 for k = 1, enemies, 1 1052 do 1053 rUnit = {125 -math.sin(math.pi*((k-1/2)/enemies))*200, math.pow(-1,k)*300, math.cos(math.pi*((k-1/2)/enemies))*1000} 1054 cEnemyNow = addC(cEnemy,rUnit) 1055 ?> 1056 1057 <SpaceShip health=400 initialhealth=400 maxhealth=400 position="<?lua printC(cEnemyNow) ?>" name="enemy<?lua print(k) ?>"> 1058 <templates> 1059 <Template link=enemy /> 1060 </templates> 1061 <events> 1062 <activity> 1063 <EventListener event="cloakBeacon" /> 1064 </activity> 1065 <visibility> 1066 <EventListener event="cloakBeacon" /> 1067 </visibility> 1068 </events> 1069 <controller> 1070 <DivisionController name="enemyControll" active=false team=1 formationMode="diamond" spread=100> 1071 <actionpoints> 1072 <Actionpoint position="<?lua printC(cEnemyNow) ?>" action="fightall" /> 1073 </actionpoints> 1074 </DivisionController> 1075 </controller> 1076 </SpaceShip> 1077 1078 <SpaceShip health=400 initialhealth=400 maxhealth=400 position="<?lua printC(addC(cEnemyNow,rSection)) ?>" name="enemy<?lua print(k) ?>"> 1079 <templates> 1080 <Template link=enemy /> 1081 </templates> 1082 <events> 1083 <activity> 1084 <EventListener event="cloakBeacon" /> 1085 </activity> 1086 <visibility> 1087 <EventListener event="cloakBeacon" /> 1088 </visibility> 1089 </events> 1090 <controller> 1091 <SectionController name="enemyControll" active=false team=1> 1092 </SectionController> 1093 </controller> 1094 </SpaceShip> 1095 1096 <SpaceShip health=400 initialhealth=400 maxhealth=400 position="<?lua printC(addC(cEnemyNow,rWingman1)) ?>" lookat="0,0,0" name="enemy<?lua print(k) ?>"> 1097 <templates> 1098 <Template link=enemy /> 1099 </templates> 1100 <events> 1101 <activity> 1102 <EventListener event="cloakBeacon" /> 1103 </activity> 1104 <visibility> 1105 <EventListener event="cloakBeacon" /> 1106 </visibility> 1107 </events> 1108 <controller> 1109 <WingmanController name="enemyControll" active=false team=1> 1110 </WingmanController> 1111 </controller> 1112 </SpaceShip> 1113 1114 <SpaceShip health=400 initialhealth=400 maxhealth=400 position="<?lua printC(addC(cEnemyNow,rWingman2)) ?>" name="enemy<?lua print(k) ?>"> 1115 <templates> 1116 <Template link=enemy /> 1117 </templates> 1118 <events> 1119 <activity> 1120 <EventListener event="cloakBeacon" /> 1121 </activity> 1122 <visibility> 1123 <EventListener event="cloakBeacon" /> 1124 </visibility> 1125 </events> 1126 <controller> 1127 <WingmanController name="enemyControll" active=false team=1> 1128 </WingmanController> 1129 </controller> 1130 </SpaceShip> 1131 1132 <?lua end ?> 499 1133 500 1134 </Scene>
Note: See TracChangeset
for help on using the changeset viewer.