Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11672


Ignore:
Timestamp:
Dec 14, 2017, 4:03:06 PM (7 years ago)
Author:
lrigoni
Message:

Final changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ProtectBoss_HS17/data/levels/ProtectBoss.oxw

    r11639 r11672  
    22 name = "ProtectBoss"
    33 description = "Protect a disabled cargo ship!"
    4  tags = "test, mission"
     4 tags = "mission"
    55 screenshot = "emptylevel.png"
    66/>
     
    6666        collisionType = kinematic
    6767        enablecollisiondamage=true
    68         collisiondamage = 10
     68        collisiondamage = 5
    6969        position  = "0,0,-2500"
    7070        mass      = 100000
    71         health    = 100 initialhealth=100 maxhealth="100"
     71        health    = 2500 initialhealth=2500 maxhealth="2500"
    7272        direction = "1,0,0"
    7373        rotationaxis="0,0,1" rotationrate="4.5" velocity="0,0,30"
     
    114114    </Pawn>
    115115
     116    <!-- triggers some time after start -->
     117    <DistanceTrigger name="someTimeAfterStart" beaconMode=identify position="0,0,1000" distance=1000 target="Pawn" targetname="CargoShip" />
     118
    116119    <!-- triggers when first quest is completed -->
    117120    <DistanceTrigger name="passedAsteroidFieldOne" beaconMode=identify position="0,0,3000" distance=1000 target="Pawn" targetname="CargoShip" />
     
    125128        end
    126129      ?>
    127       <!--EventTrigger activations="1" stayactive="true" >
    128         <events>
    129           <trigger>
    130              <EventListener event="p1" />
    131           </trigger>
    132         </events>
    133       </EventTrigger>
    134       <EventTrigger activations="1" stayactive="true" >
    135         <events>
    136           <trigger>
    137              <EventListener event="p2" />
    138           </trigger>
    139         </events>
    140       </EventTrigger>
    141       <EventTrigger activations="1" stayactive="true" >
    142         <events>
    143           <trigger>
    144              <EventListener event="p3" />
    145           </trigger>
    146         </events>
    147       </EventTrigger-->
    148130    </Trigger>
    149131
     
    155137        end
    156138      ?>
    157       <!--EventTrigger activations="1" stayactive="true" >
    158         <events>
    159           <trigger>
    160              <EventListener event="p11" />
    161           </trigger>
    162         </events>
    163       </EventTrigger>
    164       <EventTrigger activations="1" stayactive="true" >
    165         <events>
    166           <trigger>
    167              <EventListener event="p12" />
    168           </trigger>
    169         </events>
    170       </EventTrigger>
    171       <EventTrigger activations="1" stayactive="true" >
    172         <events>
    173           <trigger>
    174              <EventListener event="p13" />
    175           </trigger>
    176         </events>
    177       </EventTrigger>
    178       <EventTrigger activations="1" stayactive="true" >
    179         <events>
    180           <trigger>
    181              <EventListener event="p14" />
    182           </trigger>
    183         </events>
    184       </EventTrigger>
    185       <EventTrigger activations="1" stayactive="true" >
    186         <events>
    187           <trigger>
    188              <EventListener event="p15" />
    189           </trigger>
    190         </events>
    191       </EventTrigger>
    192       <EventTrigger activations="1" stayactive="true" >
    193         <events>
    194           <trigger>
    195              <EventListener event="p16" />
    196           </trigger>
    197         </events>
    198       </EventTrigger-->
    199139    </Trigger>
    200140
     
    211151
    212152    <!-- triggers when third pirate wave is defeated -->
    213     <Trigger name="thirdPirateWaveKilled" mode="and" delay=5>
     153    <Trigger name="thirdPirateWaveKilled" mode="and">
    214154      <?lua
    215155        for n = 1, 7, 1 do
     
    217157        end
    218158      ?>
    219       <!--EventTrigger activations="1" stayactive="true" >
    220         <events>
    221           <trigger>
    222              <EventListener event="p21" />
    223           </trigger>
    224         </events>
    225       </EventTrigger>
    226       <EventTrigger activations="1" stayactive="true" >
    227         <events>
    228           <trigger>
    229              <EventListener event="p22" />
    230           </trigger>
    231         </events>
    232       </EventTrigger>
    233       <EventTrigger activations="1" stayactive="true" >
    234         <events>
    235           <trigger>
    236              <EventListener event="p23" />
    237           </trigger>
    238         </events>
    239       </EventTrigger>
    240       <EventTrigger activations="1" stayactive="true" >
    241         <events>
    242           <trigger>
    243              <EventListener event="p24" />
    244           </trigger>
    245         </events>
    246       </EventTrigger>
    247       <EventTrigger activations="1" stayactive="true" >
    248         <events>
    249           <trigger>
    250              <EventListener event="p25" />
    251           </trigger>
    252         </events>
    253       </EventTrigger>
    254       <EventTrigger activations="1" stayactive="true" >
    255         <events>
    256           <trigger>
    257              <EventListener event="p26" />
    258           </trigger>
    259         </events>
    260       </EventTrigger>
    261       <EventTrigger activations="1" stayactive="true" >
    262         <events>
    263           <trigger>
    264              <EventListener event="p27" />
    265           </trigger>
    266         </events>
    267       </EventTrigger-->
    268     </Trigger>
    269 
    270     <Trigger name="succeedMission" delay=7>
     159    </Trigger>
     160
     161    <Trigger name="succeedMission" mode=and delay=1>
    271162      <EventTrigger activations="1" stayactive="true" >
    272163        <events>
     
    276167        </events>
    277168      </EventTrigger>
    278     </Trigger>
    279 
    280       <EventTrigger activations="1" stayactive="true" name="failMission" delay=0.1>
     169      <EventTrigger activations="1" stayactive="false" name="cargoShipStillAlive" invert=true>
    281170        <events>
    282171          <trigger>
     
    285174        </events>
    286175      </EventTrigger>
     176    </Trigger>
     177
     178    <EventTrigger activations="1" stayactive="true" name="failMission" delay=0.1>
     179      <events>
     180        <trigger>
     181           <EventListener event="CargoShip" />
     182        </trigger>
     183      </events>
     184    </EventTrigger>
    287185
    288186    <!-- create asteroids and pickups -->
     
    299197      end
    300198
    301       for count = 1, 30, 1 do
     199      for count = 1, 60, 1 do
    302200        x = math.random(-1000, 1000)
    303201        y = math.random(-1000, 1000)
    304202        z = 125 * count + math.random(-250, 250)
    305203        vmax = 7
     204        if count > 30 then
     205          vmax = 2
     206        end
    306207        rx = math.random(-vmax, vmax)
    307208        ry = math.random(-vmax, vmax)
     
    314215      end
    315216
    316       for count = 1, 50, 1 do
     217      for count = 1, 60, 1 do
    317218        x = math.random(-1000, 1000)
    318219        y = math.random(-1000, 1000)
    319         z = 125 * count + math.random(-250, 250)
     220        z = 3000 + 125 * count + math.random(-250, 250)
    320221        typenum = math.random(11)
    321222        type = ""
     
    382283
    383284    <LocalQuest id="ProtectBoss.AsteroidField">
    384         <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="" />
     285        <QuestDescription title="Protect the Cargo Ship" 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="" />
    385286        <complete-effects>
    386287            <AddQuest questId="ProtectBoss.PirateAttack" />
     
    392293    </LocalQuest>
    393294
    394     <SimpleNotification message="Pirates are attacking!" broadcast="true" >
    395         <events>
    396             <trigger>
    397                 <EventListener event="passedAsteroidFieldOne" />
     295    <SimpleNotification message="There are pirates around!" broadcast="true" >
     296        <events>
     297            <trigger>
     298                <EventListener event="someTimeAfterStart" />
    398299            </trigger>
    399300        </events>
     
    416317    </SimpleNotification>
    417318
    418     <SimpleNotification message="The third and last pirate wave is preparing for attack! They will arrive soon!" broadcast=true >
     319    <SimpleNotification message="The third and last pirate wave is near!" broadcast=true >
    419320      <events>
    420321            <trigger>
     
    424325    </SimpleNotification>
    425326
    426     <SimpleNotification message="The pirates are attacking!" broadcast=true >
    427       <events>
    428             <trigger>
    429                 <EventListener event="thirdPirateWaveStarting" />
    430             </trigger>
    431         </events>
    432     </SimpleNotification>
    433 
    434     <SimpleNotification message="You defeated the pirates! The cargo ship is exiting the asteroid field. You made it!" broadcast=true >
    435       <events>
    436             <trigger>
    437                 <EventListener event="thirdPirateWaveKilled" />
    438             </trigger>
    439         </events>
    440     </SimpleNotification>
    441 
    442     <Script code="Mission endMission true" onLoad="false">
    443         <events>
     327    <SimpleNotification message="The cargo ship is out of danger. You made it!" broadcast=true >
     328      <events>
    444329            <trigger>
    445330                <EventListener event="succeedMission" />
    446331            </trigger>
    447332        </events>
    448     </Script>
    449 
    450     <Script code="Mission endMission false" onLoad="false">
    451         <events>
    452             <trigger>
    453                 <EventListener event="CargoShip" />
    454             </trigger>
    455         </events>
    456     </Script>
     333    </SimpleNotification>
    457334
    458335    <!-- A function to put pirates to a certain location -->
    459336    <?lua
    460337      function placePirate(posX, posY, posZ, name, trigger)
    461         print("<SpaceShip mass=10 health=25 initialhealth=25 maxhealth=25 shieldhealth=10 maxshieldhealth=10 initialshieldhealth=10 shieldabsorption=0.3 shieldrechargerate=1 shieldrechargewaittime=1 primaryThrust=40 auxiliaryThrust=15 rotationThrust=10 boostpower=5 boostrate=2 boostCooldownDuration = 20 position=\"" .. posX .. "," .. posY .. "," .. posZ .. "\" name=\"" .. name .. "\" radarname=Pirate><events><visibility><EventListener event=\"" .. trigger .. "\"/></visibility><activity><EventListener event=\"" .. trigger .. "\"/></activity></events><templates><Template link=spaceshippirate /></templates><controller><WaypointPatrolController alertnessradius=3129 team=1 active=false><waypoints><Model mesh=\"cube.mesh\" scale=0 position=\"-1300,-600,900\" /><Model mesh=\"cube.mesh\" scale=0 position=\"0,0,0\" /></waypoints><events><activity><EventListener event=attack /></activity></events></WaypointPatrolController></controller></SpaceShip>")
     338        print("<SpaceShip mass=10 health=25 initialhealth=25 maxhealth=25 shieldhealth=10 maxshieldhealth=10 initialshieldhealth=10 shieldabsorption=0.3 shieldrechargerate=1 shieldrechargewaittime=1 primaryThrust=20 auxiliaryThrust=5 rotationThrust=5 boostpower=2 boostrate=1 boostCooldownDuration = 50 accuracy=1 position=\"" .. posX .. "," .. posY .. "," .. posZ .. "\" name=\"" .. name .. "\" radarname=Pirate><!--events><visibility><EventListener event=\"" .. trigger .. "\"/></visibility><activity><EventListener event=\"" .. trigger .. "\"/></activity></events--><templates><Template link=spaceshippirate /></templates><controller><WaypointPatrolController alertnessradius=2700 attackradius=1850 team=1 active=true><waypoints><StaticEntity position=\"" .. posX .. "," .. posY .. "," .. posZ .. "\"/><StaticEntity position=\"" .. (posX + 100) .. "," .. posY .. "," .. posZ .. "\"/><!--Model mesh=\"cube.mesh\" scale=0 position=\"-1300,-600,900\" /><Model mesh=\"cube.mesh\" scale=0 position=\"0,0,0\" /--></waypoints><events><activity><EventListener event=attack /></activity></events></WaypointPatrolController></controller></SpaceShip>")
    462339      end
    463340    ?>
    464341
    465342    <?lua
    466       placePirate(0, 0, 3000, "p1", "passedAsteroidFieldOne")
    467       placePirate(50, 0, 3500, "p2", "passedAsteroidFieldOne")
    468       placePirate(0, 50, 4000, "p3", "passedAsteroidFieldOne")
    469       placePirate(0, 0, 5500, "p11", "firstPirateWaveKilled")
    470       placePirate(50, 0, 5600, "p12", "firstPirateWaveKilled")
    471       placePirate(-50, 0, 5700, "p13", "firstPirateWaveKilled")
    472       placePirate(0, 50, 5800, "p14", "firstPirateWaveKilled")
    473       placePirate(0, -50, 5900, "p15", "firstPirateWaveKilled")
    474       placePirate(0, 0, 6000, "p16", "firstPirateWaveKilled")
    475       placePirate(0, 0, 7000, "p21", "thirdPirateWaveStarting")
    476       placePirate(50, 0, 7100, "p22", "thirdPirateWaveStarting")
    477       placePirate(-50, 0, 7200, "p23", "thirdPirateWaveStarting")
    478       placePirate(0, 50, 7300, "p24", "thirdPirateWaveStarting")
    479       placePirate(0, -50, 7400, "p25", "thirdPirateWaveStarting")
    480       placePirate(50, 50, 7500, "p26", "thirdPirateWaveStarting")
    481       placePirate(-50, -50, 7600, "p27", "thirdPirateWaveStarting")
     343      placePirate(0, 0, 4800, "p1", "passedAsteroidFieldOne")
     344      placePirate(50, 0, 4900, "p2", "passedAsteroidFieldOne")
     345      placePirate(0, 50, 5000, "p3", "passedAsteroidFieldOne")
     346      placePirate(0, 0, 6500, "p11", "firstPirateWaveKilled")
     347      placePirate(50, 0, 6600, "p12", "firstPirateWaveKilled")
     348      placePirate(-50, 0, 6700, "p13", "firstPirateWaveKilled")
     349      placePirate(0, 50, 6800, "p14", "firstPirateWaveKilled")
     350      placePirate(0, -50, 6900, "p15", "firstPirateWaveKilled")
     351      placePirate(0, 0, 7000, "p16", "firstPirateWaveKilled")
     352      placePirate(0, 0, 8000, "p21", "thirdPirateWaveStarting")
     353      placePirate(50, 0, 8100, "p22", "thirdPirateWaveStarting")
     354      placePirate(-50, 0, 8200, "p23", "thirdPirateWaveStarting")
     355      placePirate(0, 50, 8300, "p24", "thirdPirateWaveStarting")
     356      placePirate(0, -50, 8400, "p25", "thirdPirateWaveStarting")
     357      placePirate(50, 50, 8500, "p26", "thirdPirateWaveStarting")
     358      placePirate(-50, -50, 8600, "p27", "thirdPirateWaveStarting")
    482359    ?>
    483360
Note: See TracChangeset for help on using the changeset viewer.