Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11542


Ignore:
Timestamp:
Nov 6, 2017, 4:10:49 PM (7 years ago)
Author:
lrigoni
Message:

Changes of 6.11.2017

File:
1 edited

Legend:

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

    r11522 r11542  
    6969        radarname = "Target" >
    7070      <attached>
     71        <DistanceTriggerBeacon name="CargoShip" />
    7172        <Model mesh="Transporterspaceship.mesh" mass=10000 position="0,0,0" scale=50 />
    7273      </attached>
    73       <collisionShapes>
     74      <collisionShapes><!-- TODO: Change the collision shape -->
    7475        <BoxCollisionShape  position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes -->
    7576        <BoxCollisionShape  position="290,0,-480" halfExtents="115,100,245" yaw=-120 />
     
    9192    </SpaceShip>
    9293
     94    <DistanceTrigger name="passedAsteroidFieldOne" beaconMode=identify position="0,0,3000" distance=1000 target="SpaceShip" targetname="CargoShip" />
     95
     96    <!--DistanceTrigger name="passedAsteroidFieldOne" position="0,0,3000" distance=1000 targetname="CargoShip" target="SpaceShip"/-->
     97
     98    <StaticEntity postion="0,0,3000">
     99      <attached>
     100        <Model mesh="cokebottle.mesh" scale=10/>
     101      </attached>
     102    </StaticEntity>
     103
     104    <QuestEffectBeacon times=1>
     105      <effects>
     106        <CompleteQuest questId="ProtectBoss.AsteroidField" />
     107      </effects>
     108      <events>
     109        <execute>
     110          <EventListener event="passedAsteroidFieldOne" />
     111        </execute>
     112      </events>
     113      <attached>
     114        <DistanceTrigger name="passedAsteroidFieldOne" />
     115      </attached>
     116    </QuestEffectBeacon>
     117
    93118    <!-- create asteroids -->
    94119    <?lua
    95       for count = 1, 100, 1 do
     120      for count = 1, 30, 1 do
    96121        x = math.random(-1000, 1000)
    97122        y = math.random(-1000, 1000)
    98123        z = 125 * count + math.random(-250, 250)
    99         print("<Pawn health=30 position=\"" .. x .. "," .. y .. "," .. z .. "\" direction=\"0,0,-1\" collisionType=dynamic mass=100 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=4 /> </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>")
     124        vmax = 10
     125        rx = math.random(-vmax, vmax)
     126        ry = math.random(-vmax, vmax)
     127        rz = math.random(-vmax, vmax)
     128        vx = math.random(-vmax, vmax)
     129        vy = math.random(-vmax, vmax)
     130        vz = math.random(-vmax, vmax)
     131        rr = math.random() * 10
     132        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=4 /> </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>")
    100133      end
    101134    ?>
     
    106139      </effects>
    107140      <events>
    108           <execute>
     141        <execute>
    109142          <EventListener event=spawntrigger />
    110143        </execute>
     
    122155    <LocalQuest id="ProtectBoss.AsteroidField">
    123156        <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="" />
    124         <!--complete-effects>
    125             <AddQuest questId="missionOne.navigation" />
    126         </complete-effects-->
     157        <complete-effects>
     158            <AddQuest questId="ProtectBoss.PirateAttack" />
     159        </complete-effects>
    127160    </LocalQuest>
     161
     162    <LocalQuest id="ProtectBoss.PirateAttack">
     163      <QuestDescription title="Pirate Attack" description="Protect the cargo ship from the attacking pirates!" failmessage="The pirates boarded the cargo ship!" completeMessage="" />
     164    </LocalQuest>
     165
     166    <SimpleNotification message="Quest 1 completed (test message)" broadcast = true>
     167        <events>
     168            <trigger>
     169                <EventListener event="passedAsteroidFieldOne" />
     170            </trigger>
     171        </events>
     172    </SimpleNotification>
     173
     174    <SimpleNotification message="Spawntrigger (test message)" broadcast = true>
     175        <events>
     176            <trigger>
     177                <EventListener event="spawntrigger" />
     178            </trigger>
     179        </events>
     180    </SimpleNotification>
    128181   
    129182  </Scene>
Note: See TracChangeset for help on using the changeset viewer.