Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11585


Ignore:
Timestamp:
Nov 20, 2017, 5:32:43 PM (7 years ago)
Author:
lrigoni
Message:

Changes 20.11.2017

File:
1 edited

Legend:

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

    r11557 r11585  
    5555    </EventMultiTrigger>
    5656   
    57     <SpaceShip
     57    <Pawn
    5858        team      = 0
     59        collisionType = kinematic
    5960        position  = "0,0,-2500"
    6061        mass      = 10000
    61         health    = 100000 initialhealth=100000 maxhealth="100000"
     62        health    = 1000 initialhealth=1000 maxhealth="1000"
     63        direction = "1,0,0"
    6264        rotationaxis="0,0,1" rotationrate="4.5" velocity="0,0,30"
    63         name      = "target"
    64         radarname = "Target" >
     65        name      = "CargoShip"
     66        radarname = "Cargo Ship" >
    6567      <attached>
    6668        <DistanceTriggerBeacon name="CargoShip" />
     
    7274        <BoxCollisionShape position="-100,-50,280" halfExtents="220,70,100" />
    7375      </collisionShapes>
    74     </SpaceShip>
     76      <explosion>
     77        <ExplosionPart scale = 12 minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
     78        <ExplosionPart scale = 12 minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
     79        <ExplosionPart scale = 12 minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
     80        <ExplosionPart offset="94,33,-50" delay=1 minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
     81        <ExplosionPart offset="94,33,-50" delay=1 minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
     82        <ExplosionPart offset="94,33,-50" delay=1 minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
     83   
     84        <ExplosionPart scale = 5 mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
     85        <ExplosionPart scale = 5 mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
     86        <ExplosionPart scale = 5 mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
     87        <ExplosionPart scale = 5 mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
     88        <ExplosionPart scale = 5 mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
     89        <ExplosionPart scale = 5 mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
     90        <ExplosionPart scale = 5 mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
     91        <ExplosionPart scale = 5 mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
     92        <ExplosionPart delay=0.8 scale = 2.5 mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
     93        <ExplosionPart delay=0.8 scale = 2.5 mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
     94        <ExplosionPart delay=0.8 scale = 2.5 mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
     95        <ExplosionPart delay=0.8 scale = 2.5 mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
     96       
     97        <ExplosionPart offset="20,13,-15" scale=7 delay=1.3 minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
     98        <ExplosionPart offset="30,13,-15" scale=7 delay=1.3 minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
     99        <ExplosionPart offset="20,13,-15" scale=7 delay=1.3 minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
     100        <ExplosionPart offset="-20,-13,-15" scale=5 delay=1.8 minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
     101        <ExplosionPart offset="-20,-13,-15" scale=5 delay=1.8 minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
     102        <ExplosionPart offset="-20,-13,-15" scale=5 delay=1.8 minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
     103      </explosion>
     104    </Pawn>
    75105
    76106    <!-- triggers when first quest is completed -->
    77     <DistanceTrigger name="passedAsteroidFieldOne" beaconMode=identify position="0,0,-3000" distance=1000 target="SpaceShip" targetname="CargoShip" />
     107    <DistanceTrigger name="passedAsteroidFieldOne" beaconMode=identify position="0,0,3000" distance=1000 target="Pawn" targetname="CargoShip" />
    78108
    79109    <!-- create asteroids -->
     
    91121        vz = math.random(-vmax, vmax)
    92122        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>")
     123        print("<Pawn team=1 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>")
    94124      end
    95125    ?>
     
    111141      <effects>
    112142        <CompleteQuest questId="ProtectBoss.AsteroidField" />
    113         <AddQuest questId="ProtectBoss.PirateAttack" />
     143        <!--AddQuest questId="ProtectBoss.PirateAttack" /-->
    114144      </effects>
    115145      <events>
    116146        <execute>
    117           <EventListener event="passedAsteroidFieldOne" />
     147          <EventListener event=passedAsteroidFieldOne />
    118148        </execute>
    119149      </events>
     
    130160    <LocalQuest id="ProtectBoss.AsteroidField">
    131161        <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>
     162        <complete-effects>
    133163            <AddQuest questId="ProtectBoss.PirateAttack" />
    134         </complete-effects-->
     164        </complete-effects>
    135165    </LocalQuest>
    136166
     
    139169    </LocalQuest>
    140170
    141     <SimpleNotification message="Quest 1 completed (test message)">
     171    <SimpleNotification message="Pirates are attacking!" broadcast="true" >
    142172        <events>
    143173            <trigger>
     
    147177    </SimpleNotification>
    148178
    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>
     179    <SimpleNotification message="The cargo ship got destroyed!" broadcast=true >
     180      <events>
     181            <trigger>
     182                <EventListener event="CargoShip" />
     183            </trigger>
    154184        </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    
     185    </SimpleNotification>
     186
     187    <!-- A function to put pirates to a certain location -->
     188    <?lua
     189      function placePirate(posX, posY, posZ, trigger)
     190        print("<SpaceShip mass=10 position=\"" .. posX .. "," .. posY .. "," .. posZ .. "\" name=Pirate 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>")
     191      end
     192    ?>
     193
     194    <?lua
     195      placePirate(0, 0, 5500, "passedAsteroidFieldOne")
     196      placePirate(0, 0, 6500, "passedAsteroidFieldOne")
     197      placePirate(0, 0, 7500, "passedAsteroidFieldOne")
     198    ?>
     199
    173200  </Scene>
    174201</Level>
Note: See TracChangeset for help on using the changeset viewer.