Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 13, 2017, 4:13:43 PM (7 years ago)
Author:
lrigoni
Message:

Commit of 13.11.17

File:
1 edited

Legend:

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

    r11542 r11557  
    1717  include("templates/spaceshipAssff.oxt")
    1818  include("templates/endurancetest_template.oxt")
     19  include("templates/spaceshipPirate.oxt")
    1920?>
    2021
     
    4546
    4647    <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"/>
     48
    4749    <EventMultiTrigger name=spawntrigger>
    4850      <events>
     
    5254      </events>
    5355    </EventMultiTrigger>
    54 
    55     <!-- Cargo ship / target -->
    56     <!--MovableEntity collisionType=kinematic linearDamping=0.8 angularDamping=0 mass="100" position="0,0,-2500" rotationaxis="0,0,1" rotationrate="4.5" velocity="0,0,30" radarname="Target">
    57     <attached>
    58         <Model scale="<?lua print(math.random(20,70)) ?>" mesh="Transporterspaceship.mesh" shadow=false/>
    59     </attached>
    60     </MovableEntity-->
    61 
     56   
    6257    <SpaceShip
    6358        team      = 0
     
    7065      <attached>
    7166        <DistanceTriggerBeacon name="CargoShip" />
    72         <Model mesh="Transporterspaceship.mesh" mass=10000 position="0,0,0" scale=50 />
     67        <Model mesh="escortShip.mesh" mass=10000 position="0,0,0" scale=100 />
    7368      </attached>
    74       <collisionShapes><!-- TODO: Change the collision shape -->
    75         <BoxCollisionShape  position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes -->
    76         <BoxCollisionShape  position="290,0,-480" halfExtents="115,100,245" yaw=-120 />
    77         <BoxCollisionShape  position="290,0,480" halfExtents="115,100,245" yaw=-240 />
    78         <BoxCollisionShape  position="-280,0,0" halfExtents="163,50,50" /><!-- Three lower connections -->
    79         <BoxCollisionShape  position="140,0,-240" halfExtents="163,50,50" yaw=-120 />
    80         <BoxCollisionShape  position="140,0,240" halfExtents="163,50,50" yaw=-240 />
    81         <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" /><!-- Upper Tower -->
    82         <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-120 />
    83         <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-240 />
    84         <BoxCollisionShape  position="0,400,0" halfExtents="43,110,26" yaw=-30 /><!-- Middle one-->
    85         <BoxCollisionShape  position="-200,100,0" halfExtents="26,50,43" /><!--Three lower legs -->
    86         <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=-30 />
    87         <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=30 />
    88         <BoxCollisionShape  position="-100,264,0" halfExtents="26,105,43" roll=-49 /><!--Three upper legs -->
    89         <BoxCollisionShape  position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 />
    90         <BoxCollisionShape  position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 />
     69      <collisionShapes>
     70        <BoxCollisionShape position="0,0,0" halfExtents="300,100,200" /> <!-- laenge  ,   dicke    , breite -->
     71        <BoxCollisionShape position="-100,-50,-280" halfExtents="220,70,100" />
     72        <BoxCollisionShape position="-100,-50,280" halfExtents="220,70,100" />
    9173      </collisionShapes>
    9274    </SpaceShip>
    9375
    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>
     76    <!-- triggers when first quest is completed -->
     77    <DistanceTrigger name="passedAsteroidFieldOne" beaconMode=identify position="0,0,-3000" distance=1000 target="SpaceShip" targetname="CargoShip" />
    11778
    11879    <!-- create asteroids -->
     
    12283        y = math.random(-1000, 1000)
    12384        z = 125 * count + math.random(-250, 250)
    124         vmax = 10
     85        vmax = 7
    12586        rx = math.random(-vmax, vmax)
    12687        ry = math.random(-vmax, vmax)
     
    13091        vz = math.random(-vmax, vmax)
    13192        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>")
     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>")
    13394      end
    13495    ?>
    13596
     97    <!-- start first quest -->
    13698    <QuestEffectBeacon times=1>
    13799      <effects>
     
    141103        <execute>
    142104          <EventListener event=spawntrigger />
     105        </execute>
     106      </events>
     107    </QuestEffectBeacon>
     108
     109    <!-- start second quest (doesn't work yet) -->
     110    <QuestEffectBeacon times=1>
     111      <effects>
     112        <CompleteQuest questId="ProtectBoss.AsteroidField" />
     113        <AddQuest questId="ProtectBoss.PirateAttack" />
     114      </effects>
     115      <events>
     116        <execute>
     117          <EventListener event="passedAsteroidFieldOne" />
    143118        </execute>
    144119      </events>
     
    155130    <LocalQuest id="ProtectBoss.AsteroidField">
    156131        <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="" />
    157         <complete-effects>
     132        <!--complete-effects>
    158133            <AddQuest questId="ProtectBoss.PirateAttack" />
    159         </complete-effects>
     134        </complete-effects-->
    160135    </LocalQuest>
    161136
     
    164139    </LocalQuest>
    165140
    166     <SimpleNotification message="Quest 1 completed (test message)" broadcast = true>
     141    <SimpleNotification message="Quest 1 completed (test message)">
    167142        <events>
    168143            <trigger>
     
    172147    </SimpleNotification>
    173148
    174     <SimpleNotification message="Spawntrigger (test message)" broadcast = true>
     149    <SpaceShip position="0,0,3500" lookat="-1300,-600,900" name="Pirate" radarname="Pirate" visible="true">
    175150        <events>
    176             <trigger>
    177                 <EventListener event="spawntrigger" />
    178             </trigger>
     151            <visibility>
     152                <EventListener event="passedAsteroidFieldOne" />
     153            </visibility>
    179154        </events>
    180     </SimpleNotification>
     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>
    181172   
    182173  </Scene>
Note: See TracChangeset for help on using the changeset viewer.