Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6358 for code/branches


Ignore:
Timestamp:
Dec 15, 2009, 11:59:42 PM (15 years ago)
Author:
decapitb
Message:

a rocket near the ghost ships triggers an attack (obviously they feel threatened)

File:
1 edited

Legend:

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

    r6347 r6358  
    2424  >
    2525
    26    
     26
    2727<AmbientSound ambientSource="Mars.ogg" loop="true" play="true" />
    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" />
    3030<?lua
    31    for i = 1, 50, 1 
     31   for i = 1, 50, 1
    3232   do
    3333   x = math.random() * 2000  + 4000
     
    3636   s = math.random() * 100
    3737   ?>
    38    
    39     <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) ?>"> 
     38
     39    <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) ?>">
    4040      <attached>
    4141        <Model position="0,0,0" scale=<?lua print(s) ?> mesh="asteroid_UV.mesh" />
     
    4646    </MovableEntity>
    4747     <ParticleSpawner position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" source="Orxonox/Steam" lifetime=3.0 loop=1 />
    48 <?lua 
     48<?lua
    4949end
    5050?>
     
    5656    return table.getn(elements)
    5757end
    58 for i = 1, 100, 1 
     58for i = 1, 100, 1
    5959do
    6060x = math.random() * 750 - 4500
     
    6363e = math.floor(math.random()*elements.length()+1)
    6464?>
    65    
    66     <MovableEntity mass=90000 position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" linearDamping=0.8 angularDamping=0.8 rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30- 15) ?>"> 
     65
     66    <MovableEntity mass=90000 position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" linearDamping=0.8 angularDamping=0.8 rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30- 15) ?>">
    6767      <attached>
    6868        <Model position="0,0,0" scale="<?lua print(sizes[e]) ?>" mesh="<?lua print( elements[e]) ?>" />
    6969      </attached>
    7070    </MovableEntity>
    71         <?lua 
     71        <?lua
    7272        end
    7373        ?>
    7474<?lua
    75 for i = 1,25, 1 
     75for i = 1,25, 1
    7676do
    7777?>
     
    8888      </controller>
    8989    </SpaceShip>
    90 <?lua 
     90<?lua
    9191end
    9292?>
     
    189189
    190190   <?lua
    191    for i = 1, 50, 1 
     191   for i = 1, 50, 1
    192192   do
    193193   x = -(math.random() * 2000  + 4000)
     
    196196   s = math.random() * 100
    197197   ?>
    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) ?>"> 
     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) ?>">
    200200      <attached>
    201201        <Model position="0,0,0" scale=<?lua print(s) ?> mesh="asteroid_ice.mesh" />
     
    206206    </MovableEntity>
    207207     <ParticleSpawner position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" source="Orxonox/Steam" lifetime=3.0 loop=1 />
    208 <?lua
    209 end
    210 ?>
    211 <?lua
    212 for i = 1,25, 1
     208<?lua
     209end
     210?>
     211<!--<EventDispatcher>
     212      <targets>
     213        <EventTarget target=attack />
     214        <EventTarget target=wait />
     215      </targets>
     216      <events>
     217        <activity>
     218          <DistanceTrigger position="0, 0, 4500" distance=100 target="SpaceShip" stayactive=true />
     219        </activity>
     220      </events>
     221</EventDispatcher>
     222
     223<EventDispatcher>
     224      <targets>
     225        <EventTarget target=wait />
     226      </targets>
     227      <events>
     228        <activity>
     229          <DistanceTrigger position="0, 0, 4500" distance=100 target="SpaceShip" stayactive=false />
     230        </activity>
     231      </events>
     232</EventDispatcher>-->
     233
     234<?lua
     235for i = 1,25, 1
    213236do
    214237?>
    215     <SpaceShip position="-5000,0,<?lua print(i*50 - 150) ?>" >
     238<SpaceShip position="<?lua print(-(math.random()*500 + 4500)) ?>,<?lua print(-(math.random()*500 -250)) ?>,<?lua print(i*50 - 150) ?>" >
    216239      <templates>
    217240        <Template link=spaceshipghost />
    218241      </templates>
    219242      <controller>
    220         <WaypointPatrolController alertnessradius=1000 team=1 active=true>
    221           <waypoints>
    222             <StaticEntity position="-5000,<?lua print(math.random()*50)?> ,<?lua print(i*50 -150) ?>" />
    223           </waypoints>
    224         </WaypointPatrolController>
     243
     244          <WaypointPatrolController name=attack alertnessradius=15000 team=1 active=false>
     245          <events>
     246           <activity>
     247             <DistanceTrigger position="-5000, 100, 100" distance=2000 target="Camera" stayactive=true />
     248           </activity>
     249          </events>
     250          </WaypointPatrolController>
     251
    225252      </controller>
    226253    </SpaceShip>
    227 <?lua
    228 end
    229 ?>
     254<?lua
     255end
     256?>
     257
    230258
    231259
Note: See TracChangeset for help on using the changeset viewer.