Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6347


Ignore:
Timestamp:
Dec 13, 2009, 8:45:30 PM (15 years ago)
Author:
decapitb
Message:

added a second asteroid field with "ghost" and enemies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/data/levels/presentationHS09b.oxw

    r6345 r6347  
    2828
    2929   <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" />
    30    <?lua
    31    elements = {"asteroid_UV.mesh"
    32 --, "asteroid_ice.mesh"
    33 --, "ast1.mesh", "ast2.mesh", "ast3.mesh", "ast4.mesh", "ast5.mesh", "ast6.mesh"
    34 }
    35    elements.length = function()
    36         return table.getn(elements)
    37    end
     30<?lua
    3831   for i = 1, 50, 1
    3932   do
     
    4235   z = math.random() * 2000 - 1000
    4336   s = math.random() * 100
    44    e = math.floor(math.random()*elements.length()+1)
    4537   ?>
    4638   
    4739    <MovableEntity collisiontype=dynamic mass=<?lua print(s*10)?> position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" linearDamping=0.01 angularDamping=0 rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 100 - 15) ?>">
    4840      <attached>
    49         <Model position="0,0,0" scale=<?lua print(s) ?> mesh="<?lua print(elements[e])?>" />
     41        <Model position="0,0,0" scale=<?lua print(s) ?> mesh="asteroid_UV.mesh" />
    5042      </attached>
    5143        <collisionShapes>
    52                 <SphereCollisionShape radius="<?lua if e==0 then print(s*0.9) end if e==1 then print(s*0.3) end if e==2 or e==3 or e==4 or e==5 or e==6 or e==7 then print(s*2) end ?>" />
     44                <SphereCollisionShape radius="<?lua print(s*0.9) ?>" />
    5345        </collisionShapes>
    5446    </MovableEntity>
    55 <?lua
    56 end
    57 ?>
    58 
    59 <?lua
    60 for i = 1, 50, 1
    61 do
    62    x = math.random() * 2000  + 4000
    63    y = math.random() * 4000 - 2000
    64    z = math.random() * 2000 - 1000
    65 ?>
    66 
    67  <ParticleSpawner position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" source="Orxonox/Steam" lifetime=3.0 loop=1 />
    68 <!--
    69 <Billboard material="Test/Fog" position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>"  color="1, 1, 1, 0.01" scale="20" />
    70 -->
     47     <ParticleSpawner position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" source="Orxonox/Steam" lifetime=3.0 loop=1 />
    7148<?lua
    7249end
     
    211188    </Destroyer>
    212189
    213 
     190   <?lua
     191   for i = 1, 50, 1
     192   do
     193   x = -(math.random() * 2000  + 4000)
     194   y = math.random() * 4000 - 2000
     195   z = math.random() * 2000 - 1000
     196   s = math.random() * 100
     197   ?>
     198   
     199<MovableEntity collisiontype=dynamic mass=<?lua print(s*10)?> position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" linearDamping=0.01 angularDamping=0 rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 100 - 15) ?>">
     200      <attached>
     201        <Model position="0,0,0" scale=<?lua print(s) ?> mesh="asteroid_ice.mesh" />
     202      </attached>
     203        <collisionShapes>
     204                <SphereCollisionShape radius="<?lua print(s*0.9)?>" />
     205        </collisionShapes>
     206    </MovableEntity>
     207     <ParticleSpawner position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" source="Orxonox/Steam" lifetime=3.0 loop=1 />
     208<?lua
     209end
     210?>
    214211<?lua
    215212for i = 1,25, 1
     
    218215    <SpaceShip position="-5000,0,<?lua print(i*50 - 150) ?>" >
    219216      <templates>
    220         <Template link=spaceshipGhost />
     217        <Template link=spaceshipghost />
    221218      </templates>
    222219      <controller>
    223         <WaypointPatrolController alertnessradius=1000 team=0 active=true>
     220        <WaypointPatrolController alertnessradius=1000 team=1 active=true>
    224221          <waypoints>
    225222            <StaticEntity position="-5000,<?lua print(math.random()*50)?> ,<?lua print(i*50 -150) ?>" />
Note: See TracChangeset for help on using the changeset viewer.