Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 29, 2010, 8:41:19 PM (15 years ago)
Author:
dafrick
Message:

Tested and cleaned all levels (except for the ones that someone is working on at the moment).
Two levels had old Pickups in them, they have been updated to work properly now.
All levels except one are working. The one that isn't is the presentationHS09b level, which crashes due to LOD.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/data/levels/presentation09b.oxw

    r6417 r7007  
    55  include("templates/spaceship_H2.oxt")
    66  include("templates/spaceship_pirate.oxt")
     7  include("templates/pickup_representation_templates.oxt")
    78?>
    89
     
    1617   skybox       = "Orxonox/skypanoramagen2"
    1718  >
     19
     20    <?lua
     21      include("includes/pickups.oxi")
     22    ?>
     23   
    1824    <Light type=directional position="0,0,0" direction="0.683, 0.289, 0.670" diffuse="1.0, 1.0, 1.0, 1.0" specular="1.0, 1.0, 1.0, 1.0" />
    19 
    20     <Template name="JumpItem" baseclass="Jump">
    21         <Jump velocity="0,0,-1000" jumpsAvailable="4" guiImage="jumpturbinepickup.jpg" guiText="Jump" />
    22     </Template>
    23     <Template name="HealthImmediateItem" baseclass="HealthImmediate">
    24         <HealthImmediate recoveredHealth="100" guiImage="decal.jpg" guiText="Health" />
    25     </Template>
    26     <Template name="HealthUsableItem" baseclass="HealthUsable">
    27         <HealthImmediate recoveredHealth="80" guiImage="goldwrenchpickup.jpg" guiText="Health" />
    28     </Template>
    2925
    3026    <SpawnPoint position="-3800, 2500, 1500" direction="-0.683, -0.289, -0.670"  spawnclass=SpaceShip pawndesign=spaceshipassff />
     
    8783    </SpaceShip>
    8884
    89     <PickupSpawner item="JumpItem" triggerDistance="20" respawnTime="10000" position="-3800, 2500, 1500">
    90         <attached>
    91             <!--<Model mesh="jumpthrust.mesh" scale="1.0" />
    92             <Billboard material="Examples/Flare" colour="0.5, 1.0, 0.3" scale="0.5" />-->
    93         </attached>
     85    <PickupSpawner position="-3800, 2500, 1500" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
     86      <pickup>
     87        <SpeedPickup template=smalljumppickup />
     88      </pickup>
    9489    </PickupSpawner>
    9590
    96     <PickupSpawner item="HealthUsableItem" triggerDistance="20" respawnTime="10000" position="-4150,2750,1550">
    97         <attached>
    98             <Model mesh="gwrench.mesh" scale="1.0" />
    99             <Billboard material="Examples/Flare" colour="0.3, 0.8, 1.0" scale="0.5" />
    100         </attached>
     91    <!-- PickupRepresentation for the pickup below, since it is not a standard pickup provided by pickups.oxi -->
     92    <PickupRepresentation
     93      pickupName = "Medium Health Pack"
     94      pickupDescription = "Once used adds a medium amout of health to the ship."
     95      spawnerTemplate = "mediumhealthpickupRepresentation"
     96      inventoryRepresentation = "MediumHealth"
     97    >
     98      <pickup>
     99        <HealthPickup health=100 activationType="onUse" durationType="once" />
     100      </pickup>
     101    </PickupRepresentation>
     102
     103    <PickupSpawner position="-4150,2750,1550" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
     104      <pickup>
     105        <HealthPickup health=100 activationType=onUse durationType=once />
     106      </pickup>
    101107    </PickupSpawner>
    102108
    103     <PickupSpawner item="HealthImmediateItem" triggerDistance="20" respawnTime="3" position="2300, 4300, 2400">
    104         <attached>
    105             <Model mesh="gwrench.mesh" scale="1.0" />
    106             <Billboard material="Examples/Flare" colour="0.9, 1.0, 0.1" scale="0.5" />
    107         </attached>
     109    <PickupSpawner position="2300, 4300, 2400" respawnTime="5" triggerDistance="20">
     110      <pickup>
     111        <HealthPickup template=mediumhealthpickup />
     112      </pickup>
    108113    </PickupSpawner>
    109114
     
    120125    </EventDispatcher>
    121126
    122 <?lua
    123 for i = 1, 10, 1
    124 do
    125 ?>
    126     <SpaceShip position="<?lua print(5000 + math.random() * 4000 - 2000) ?>,<?lua print(0 + math.random() * 2000 - 1000) ?>,<?lua print(math.random() * 2000 - 1000) ?>">
    127       <templates>
    128         <Template link=spaceshippirate />
    129       </templates>
    130       <controller>
    131         <WaypointPatrolController name=pirates alertnessradius=1000 team=1 active=false>
    132           <waypoints>
    133             <StaticEntity position="3100, 2000, 1500" />
    134           </waypoints>
    135         </WaypointPatrolController>
    136       </controller>
    137     </SpaceShip>
    138 <?lua
    139 end
    140 ?>
    141 
    142 <?lua
    143 for i = 1, 12, 1
    144 do
    145 ?>
    146     <SpaceShip position="<?lua print(2800 + math.random() * 2000 - 1000) ?>,<?lua print(2500+ math.random() * 1000 - 500) ?>,<?lua print(2500 + math.random() * 1000 - 500) ?>" >
    147       <templates>
    148         <Template link=spaceshipassff />
    149       </templates>
    150       <controller>
    151         <WaypointPatrolController alertnessradius=1000 team=0>
    152           <waypoints>
    153             <StaticEntity position="<?lua print(2800 + math.random() * 1000 - 500) ?>,<?lua print(2500 + math.random() * 1000 - 500) ?>,<?lua print(1500 + math.random() * 1000 - 500) ?>" />
    154           </waypoints>
    155         </WaypointPatrolController>
    156       </controller>
    157     </SpaceShip>
    158 <?lua
    159 end
    160 ?>
     127    <?lua
     128      for i = 1, 10, 1 do
     129    ?>
     130      <SpaceShip position="<?lua print(5000 + math.random() * 4000 - 2000) ?>,<?lua print(0 + math.random() * 2000 - 1000) ?>,<?lua print(math.random() * 2000 - 1000) ?>">
     131        <templates>
     132          <Template link=spaceshippirate />
     133        </templates>
     134        <controller>
     135          <WaypointPatrolController name=pirates alertnessradius=1000 team=1 active=false>
     136            <waypoints>
     137              <StaticEntity position="3100, 2000, 1500" />
     138            </waypoints>
     139          </WaypointPatrolController>
     140        </controller>
     141      </SpaceShip>
     142    <?lua end ?>
     143
     144    <?lua
     145      for i = 1, 12, 1 do
     146    ?>
     147      <SpaceShip position="<?lua print(2800 + math.random() * 2000 - 1000) ?>,<?lua print(2500+ math.random() * 1000 - 500) ?>,<?lua print(2500 + math.random() * 1000 - 500) ?>" >
     148        <templates>
     149          <Template link=spaceshipassff />
     150        </templates>
     151        <controller>
     152          <WaypointPatrolController alertnessradius=1000 team=0>
     153            <waypoints>
     154              <StaticEntity position="<?lua print(2800 + math.random() * 1000 - 500) ?>,<?lua print(2500 + math.random() * 1000 - 500) ?>,<?lua print(1500 + math.random() * 1000 - 500) ?>" />
     155            </waypoints>
     156          </WaypointPatrolController>
     157        </controller>
     158      </SpaceShip>
     159    <?lua end ?>
    161160
    162161    <Billboard position="2300, 4400, 2500" material="Examples/Flare" />
     
    172171    </EventDispatcher>
    173172
    174 <?lua
    175 for i = 1, 12, 1
    176 do
    177 ?>
    178     <SpaceShip position="<?lua print(2500 + math.random() * 500 - 250) ?>,<?lua print(4800 + math.random() * 500 - 250) ?>,<?lua print(2500 + math.random() * 500 - 250) ?>" >
    179       <templates>
    180         <Template link=spaceshipassff />
    181       </templates>
    182       <controller>
    183         <WaypointPatrolController name=attacker alertnessradius=1000 team=0 active=false>
    184           <waypoints>
    185             <StaticEntity position="<?lua print(2800 + math.random() * 500 - 250) ?>,<?lua print(2500 + math.random() * 500 - 250) ?>,<?lua print(1500 + math.random() * 500 - 250) ?>" />
    186             <StaticEntity position="<?lua print(5000 + math.random() * 500 - 250) ?>,<?lua print(0 + math.random() * 500 - 250) ?>,<?lua print(0 + math.random() * 500 - 250) ?>" />
    187             <StaticEntity position="<?lua print(7500 + math.random() * 500 - 250) ?>,<?lua print(-2500 + math.random() * 500 - 250) ?>,<?lua print(-1500 + math.random() * 500 - 250) ?>" />
    188           </waypoints>
    189         </WaypointPatrolController>
    190       </controller>
    191     </SpaceShip>
    192 <?lua
    193 end
    194 ?>
     173    <?lua
     174      for i = 1, 12, 1 do
     175    ?>
     176      <SpaceShip position="<?lua print(2500 + math.random() * 500 - 250) ?>,<?lua print(4800 + math.random() * 500 - 250) ?>,<?lua print(2500 + math.random() * 500 - 250) ?>" >
     177        <templates>
     178          <Template link=spaceshipassff />
     179        </templates>
     180        <controller>
     181          <WaypointPatrolController name=attacker alertnessradius=1000 team=0 active=false>
     182            <waypoints>
     183              <StaticEntity position="<?lua print(2800 + math.random() * 500 - 250) ?>,<?lua print(2500 + math.random() * 500 - 250) ?>,<?lua print(1500 + math.random() * 500 - 250) ?>" />
     184              <StaticEntity position="<?lua print(5000 + math.random() * 500 - 250) ?>,<?lua print(0 + math.random() * 500 - 250) ?>,<?lua print(0 + math.random() * 500 - 250) ?>" />
     185              <StaticEntity position="<?lua print(7500 + math.random() * 500 - 250) ?>,<?lua print(-2500 + math.random() * 500 - 250) ?>,<?lua print(-1500 + math.random() * 500 - 250) ?>" />
     186            </waypoints>
     187          </WaypointPatrolController>
     188        </controller>
     189      </SpaceShip>
     190    <?lua end ?>
    195191
    196192    <StaticEntity position="2800, 2500, 2500">
    197         <attached>
    198             <CheckPoint />
    199             <Model position="400, 0, 0" scale="40" mesh="DuBall2.mesh"/>
    200             <Model position="-400, 0, 0" scale="40" mesh="DuBall1.mesh"/>
    201         </attached>
     193      <attached>
     194        <CheckPoint />
     195        <Model position="400, 0, 0" scale="40" mesh="DuBall2.mesh"/>
     196        <Model position="-400, 0, 0" scale="40" mesh="DuBall1.mesh"/>
     197      </attached>
    202198    </StaticEntity>
     199
    203200<!--
    204201    <Destroyer position="6500, -2000, -1000" collisionType=dynamic linearDamping=0.8 angularDamping=0 mass=500>
    205         <attached>
    206             <CheckPoint />
    207             <Model position="0,0,0" scale="5" mesh="Carrier.mesh"/>
    208             <Backlight
    209                 mainstate=activity
    210                 active=false
    211                 scale=0.4
    212                 name=bltest
    213                 position=" 7.6, 0, 6"
    214                 colour="0.2, 0.65, 1.0, 1.0"
    215                 width=15
    216                 length=1500
    217                 lifetime=2
    218                 elements=50
    219                 trailmaterial="Trail/backlighttrail"
    220                 turnontime=1
    221                 turnofftime=1
    222                 material="Flares/ThrusterFlare1"
    223             />
    224         </attached>
    225         <collisionShapes>
    226             <BoxCollisionShape position="70,0,-25"      halfExtents="150, 50, 25" />
    227             <BoxCollisionShape position="95,75,-16"     halfExtents="70, 10, 12" />
    228             <BoxCollisionShape position="95,-75,-16"    halfExtents="70, 10, 12" />
    229             <BoxCollisionShape position="77,47,30"      halfExtents="110, 2, 30" />
    230             <BoxCollisionShape position="77,-47,30"     halfExtents="110, 2, 30" />
    231             <BoxCollisionShape position="77,0,50"       halfExtents="110, 45, 6" />
    232             <BoxCollisionShape position="167,0,70"      halfExtents="17, 20, 20" />
    233         </collisionShapes>
     202      <attached>
     203        <CheckPoint />
     204        <Model position="0,0,0" scale="5" mesh="Carrier.mesh"/>
     205        <Backlight
     206          mainstate=activity
     207          active=false
     208          scale=0.4
     209          name=bltest
     210          position=" 7.6, 0, 6"
     211          colour="0.2, 0.65, 1.0, 1.0"
     212          width=15
     213          length=1500
     214          lifetime=2
     215          elements=50
     216          trailmaterial="Trail/backlighttrail"
     217          turnontime=1
     218          turnofftime=1
     219          material="Flares/ThrusterFlare1"
     220        />
     221      </attached>
     222      <collisionShapes>
     223        <BoxCollisionShape position="70,0,-25"      halfExtents="150, 50, 25" />
     224        <BoxCollisionShape position="95,75,-16"     halfExtents="70, 10, 12" />
     225        <BoxCollisionShape position="95,-75,-16"    halfExtents="70, 10, 12" />
     226        <BoxCollisionShape position="77,47,30"      halfExtents="110, 2, 30" />
     227        <BoxCollisionShape position="77,-47,30"     halfExtents="110, 2, 30" />
     228        <BoxCollisionShape position="77,0,50"       halfExtents="110, 45, 6" />
     229        <BoxCollisionShape position="167,0,70"      halfExtents="17, 20, 20" />
     230      </collisionShapes>
    234231    </Destroyer>
    235232-->
     233
    236234    <Destroyer
    237         position          = "6500,-2000,-1000"
    238         collisionType     = dynamic
    239         mass              = 100000
    240         angularDamping    = 0.9999999
    241         health            = 1000
    242         maxhealth         = 1000
    243         initialhealth     = 1000
     235      position          = "6500,-2000,-1000"
     236      collisionType     = dynamic
     237      mass              = 100000
     238      angularDamping    = 0.9999999
     239      health            = 1000
     240      maxhealth         = 1000
     241      initialhealth     = 1000
    244242    >
     243      <controller>
     244        <WaypointPatrolController team=1 />
     245      </controller>
     246      <attached>
     247        <Model mesh="Carrier.mesh" scale="5" />
     248        <Backlight
     249          mainstate=activity
     250          active=false
     251          scale=0.4
     252          name=bltest
     253          position=" 7.6, 0, 6"
     254          colour="0.2, 0.65, 1.0, 1.0"
     255          width=15
     256          length=1500
     257          lifetime=2
     258          elements=50
     259          trailmaterial="Trail/backlighttrail"
     260          turnontime=1
     261          turnofftime=1
     262          material="Flares/ThrusterFlare1"
     263        />
     264
     265        <?lua
     266          for i=0,8,1 do
     267        ?>
     268          <BlinkingBillboard
     269            position="<?lua print(200-270/8*i)?> ,15,2"
     270            material="Examples/Flare"
     271            colour="1.0, 0.5, 0.3"
     272            phase=<?lua print(-360/8*i)?>
     273            amplitude=0.1
     274            frequency=0.5
     275            quadratic=1
     276          />
     277
     278          <BlinkingBillboard
     279            position="<?lua print(200-270/8*i)?>,-15,2"
     280            material="Examples/Flare"
     281            colour="1.0, 0.5, 0.3"
     282            phase=<?lua print(-360/8*i)?>
     283            amplitude=0.1
     284            frequency=0.5
     285            quadratic=1
     286          />
     287        <?lua end ?>
     288
     289        <Backlight
     290          scale=1
     291          position=" 169, 75, -15"
     292          colour="1, 0.85, 0.5, 0.5"
     293          width=40
     294          length=1000
     295          lifetime=5
     296          elements=15
     297          trailmaterial="Trail/backlighttrail"
     298          material="Examples/Flare"
     299        />
     300        <Backlight
     301          scale=1
     302          position=" 169, -75, -15"
     303          colour="1, 0.85, 0.5, 0.5"
     304          width=40
     305          length=1000
     306          lifetime=5
     307          elements=15
     308          trailmaterial="Trail/backlighttrail"
     309          material="Examples/Flare" />
     310      </attached>
     311      <collisionShapes>
     312        <BoxCollisionShape position="70,0,-25"      halfExtents="150, 50, 25" />
     313        <BoxCollisionShape position="95,75,-16"     halfExtents="70, 10, 12" />
     314        <BoxCollisionShape position="95,-75,-16"    halfExtents="70, 10, 12" />
     315        <BoxCollisionShape position="77,47,30"      halfExtents="110, 2, 30" />
     316        <BoxCollisionShape position="77,-47,30"     halfExtents="110, 2, 30" />
     317        <BoxCollisionShape position="77,0,50"       halfExtents="110, 45, 6" />
     318        <BoxCollisionShape position="167,0,70"      halfExtents="17, 20, 20" />
     319      </collisionShapes>
     320    </Destroyer>
     321
     322    <?lua
     323      for i = 1, 10, 1 do
     324    ?>
     325      <SpaceShip position="<?lua print(6200 + math.random() * 2000 - 1000) ?>,<?lua print(-1500 + math.random() * 1000 - 500) ?>,<?lua print(-700 + math.random() * 1000 - 500) ?>" >
     326        <templates>
     327          <Template link=spaceshippirate />
     328        </templates>
    245329        <controller>
    246           <WaypointPatrolController team=1 />
     330          <WaypointPatrolController alertnessradius=1000 team=1>
     331            <waypoints>
     332              <StaticEntity position="<?lua print(6000 + math.random() * 1000 - 500) ?>,<?lua print(-2000 + math.random() * 1000 - 500) ?>,<?lua print(-1000 + math.random() * 1000 - 500) ?>" />
     333            </waypoints>
     334          </WaypointPatrolController>
    247335        </controller>
     336      </SpaceShip>
     337    <?lua end ?>
     338
     339    <?lua
     340      for i = 1, 200, 1 do
     341        x = math.random() * 100  + (i-70) * 100
     342        y = math.random() * 3000 - 1500
     343        z = math.random() * 3000 - 1500 + (i-100) * 10
     344        s = math.random() * 60 + 30
     345    ?>
     346      <MovableEntity 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) ?>">
    248347        <attached>
    249             <Model mesh="Carrier.mesh" scale="5" />
    250             <Backlight
    251                 mainstate=activity
    252                 active=false
    253                 scale=0.4
    254                 name=bltest
    255                 position=" 7.6, 0, 6"
    256                 colour="0.2, 0.65, 1.0, 1.0"
    257                 width=15
    258                 length=1500
    259                 lifetime=2
    260                 elements=50
    261                 trailmaterial="Trail/backlighttrail"
    262                 turnontime=1
    263                 turnofftime=1
    264                 material="Flares/ThrusterFlare1"
    265             />
    266             <?lua for i=0,8,1 do ?>
    267                 <BlinkingBillboard
    268                     position="<?lua print(200-270/8*i)?> ,15,2"
    269                     material="Examples/Flare"
    270                     colour="1.0, 0.5, 0.3"
    271                     phase=<?lua print(-360/8*i)?>
    272                     amplitude=0.1
    273                     frequency=0.5
    274                     quadratic=1
    275                 />
    276 
    277                 <BlinkingBillboard
    278                     position="<?lua print(200-270/8*i)?>,-15,2"
    279                     material="Examples/Flare"
    280                     colour="1.0, 0.5, 0.3"
    281                     phase=<?lua print(-360/8*i)?>
    282                     amplitude=0.1
    283                     frequency=0.5
    284                     quadratic=1
    285                 />
    286             <?lua end ?>
    287 
    288             <Backlight
    289                 scale=1
    290                 position=" 169, 75, -15"
    291                 colour="1, 0.85, 0.5, 0.5"
    292                 width=40
    293                 length=1000
    294                 lifetime=5
    295                 elements=15
    296                 trailmaterial="Trail/backlighttrail"
    297                 material="Examples/Flare"
    298             />
    299             <Backlight
    300                 scale=1
    301                 position=" 169, -75, -15"
    302                 colour="1, 0.85, 0.5, 0.5"
    303                 width=40
    304                 length=1000
    305                 lifetime=5
    306                 elements=15
    307                 trailmaterial="Trail/backlighttrail"
    308                 material="Examples/Flare" />
     348          <Model position="0,0,0" scale=<?lua print(s) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
    309349        </attached>
    310         <collisionShapes>
    311             <BoxCollisionShape position="70,0,-25"      halfExtents="150, 50, 25" />
    312             <BoxCollisionShape position="95,75,-16"     halfExtents="70, 10, 12" />
    313             <BoxCollisionShape position="95,-75,-16"    halfExtents="70, 10, 12" />
    314             <BoxCollisionShape position="77,47,30"      halfExtents="110, 2, 30" />
    315             <BoxCollisionShape position="77,-47,30"     halfExtents="110, 2, 30" />
    316             <BoxCollisionShape position="77,0,50"       halfExtents="110, 45, 6" />
    317             <BoxCollisionShape position="167,0,70"      halfExtents="17, 20, 20" />
    318         </collisionShapes>
    319     </Destroyer>
    320 
    321 <?lua
    322 for i = 1, 10, 1
    323 do
    324 ?>
    325     <SpaceShip position="<?lua print(6200 + math.random() * 2000 - 1000) ?>,<?lua print(-1500 + math.random() * 1000 - 500) ?>,<?lua print(-700 + math.random() * 1000 - 500) ?>" >
    326       <templates>
    327         <Template link=spaceshippirate />
    328       </templates>
    329       <controller>
    330         <WaypointPatrolController alertnessradius=1000 team=1>
    331           <waypoints>
    332             <StaticEntity position="<?lua print(6000 + math.random() * 1000 - 500) ?>,<?lua print(-2000 + math.random() * 1000 - 500) ?>,<?lua print(-1000 + math.random() * 1000 - 500) ?>" />
    333           </waypoints>
    334         </WaypointPatrolController>
    335       </controller>
    336     </SpaceShip>
    337 <?lua
    338 end
    339 ?>
    340 
    341 <?lua
    342 for i = 1, 200, 1
    343 do
    344 x = math.random() * 100  + (i-70) * 100
    345 y = math.random() * 3000 - 1500
    346 z = math.random() * 3000 - 1500 + (i-100) * 10
    347 s = math.random() * 60 + 30
    348 ?>
    349 
    350     <MovableEntity 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) ?>">
    351       <attached>
    352         <Model position="0,0,0" scale=<?lua print(s) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
    353       </attached>
    354     </MovableEntity>
    355 <?lua
    356 end
    357 ?>
    358 
    359 <?lua
    360 elements = {"BodyDebris1.mesh", "CockpitDebris.mesh", "LightningGun.mesh", "WingDebris1.mesh", "WingDebris2.mesh", "satellitedish.mesh", "Thruster.mesh"}
    361 sizes = {4, 4, 4, 4, 4, 10, 20}
    362 elements.length = function()
    363     return table.getn(elements)
    364 end
    365 for i = 1, 150, 1
    366 do
    367 x = math.random() * 750 - 4500
    368 y = math.random() * 1000 + 2000
    369 z = math.random() * 500 + 1000
    370 e = math.floor(math.random()*elements.length()+1)
    371 ?>
    372 
    373     <MovableEntity 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) ?>">
    374       <attached>
    375         <Model position="0,0,0" scale="<?lua print(sizes[e]) ?>" mesh="<?lua print( elements[e]) ?>" />
    376       </attached>
    377     </MovableEntity>
    378 <?lua
    379 end
    380 ?>
     350      </MovableEntity>
     351    <?lua end ?>
     352
     353    <?lua
     354      elements = {"BodyDebris1.mesh", "CockpitDebris.mesh", "LightningGun.mesh", "WingDebris1.mesh", "WingDebris2.mesh", "satellitedish.mesh", "Thruster.mesh"}
     355      sizes = {4, 4, 4, 4, 4, 10, 20}
     356     
     357      elements.length = function()
     358        return table.getn(elements)
     359      end
     360     
     361      for i = 1, 150, 1 do
     362        x = math.random() * 750 - 4500
     363        y = math.random() * 1000 + 2000
     364        z = math.random() * 500 + 1000
     365        e = math.floor(math.random()*elements.length()+1)
     366    ?>
     367
     368      <MovableEntity 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) ?>">
     369        <attached>
     370          <Model position="0,0,0" scale="<?lua print(sizes[e]) ?>" mesh="<?lua print( elements[e]) ?>" />
     371        </attached>
     372      </MovableEntity>
     373    <?lua end ?>
    381374
    382375  </Scene>
Note: See TracChangeset for help on using the changeset viewer.