Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 11, 2010, 8:55:13 AM (14 years ago)
Author:
dafrick
Message:

Merged presentation3 branch into trunk.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/data/levels/presentation09b.oxw

    r6417 r7163  
    55  include("templates/spaceship_H2.oxt")
    66  include("templates/spaceship_pirate.oxt")
     7  include("templates/pickup_representation_templates.oxt")
     8  include("templates/lodinformation.oxt")
    79?>
    810
     
    1214 gametype     = TeamDeathmatch
    1315>
     16  <templates>
     17    <Template link=lodtemplate_default />
     18  </templates>
     19
    1420  <Scene
    1521   ambientlight = "0.5, 0.5, 0.5"
    1622   skybox       = "Orxonox/skypanoramagen2"
    1723  >
     24
     25    <?lua
     26      include("includes/pickups.oxi")
     27    ?>
     28   
    1829    <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>
    2930
    3031    <SpawnPoint position="-3800, 2500, 1500" direction="-0.683, -0.289, -0.670"  spawnclass=SpaceShip pawndesign=spaceshipassff />
     
    8788    </SpaceShip>
    8889
    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>
     90    <PickupSpawner position="-3800, 2500, 1500" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
     91      <pickup>
     92        <SpeedPickup template=smalljumppickup />
     93      </pickup>
    9494    </PickupSpawner>
    9595
    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>
     96    <!-- PickupRepresentation for the pickup below, since it is not a standard pickup provided by pickups.oxi -->
     97    <PickupRepresentation
     98      pickupName = "Medium Health Pack"
     99      pickupDescription = "Once used adds a medium amout of health to the ship."
     100      spawnerTemplate = "mediumhealthpickupRepresentation"
     101      inventoryRepresentation = "MediumHealth"
     102    >
     103      <pickup>
     104        <HealthPickup health=100 activationType="onUse" durationType="once" />
     105      </pickup>
     106    </PickupRepresentation>
     107
     108    <PickupSpawner position="-4150,2750,1550" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
     109      <pickup>
     110        <HealthPickup health=100 activationType=onUse durationType=once />
     111      </pickup>
    101112    </PickupSpawner>
    102113
    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>
     114    <PickupSpawner position="2300, 4300, 2400" respawnTime="5" triggerDistance="20">
     115      <pickup>
     116        <HealthPickup template=mediumhealthpickup />
     117      </pickup>
    108118    </PickupSpawner>
    109119
     
    120130    </EventDispatcher>
    121131
    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 ?>
     132    <?lua
     133      for i = 1, 10, 1 do
     134    ?>
     135      <SpaceShip position="<?lua print(5000 + math.random() * 4000 - 2000) ?>,<?lua print(0 + math.random() * 2000 - 1000) ?>,<?lua print(math.random() * 2000 - 1000) ?>">
     136        <templates>
     137          <Template link=spaceshippirate />
     138        </templates>
     139        <controller>
     140          <WaypointPatrolController name=pirates alertnessradius=1000 team=1 active=false>
     141            <waypoints>
     142              <StaticEntity position="3100, 2000, 1500" />
     143            </waypoints>
     144          </WaypointPatrolController>
     145        </controller>
     146      </SpaceShip>
     147    <?lua end ?>
     148
     149    <?lua
     150      for i = 1, 12, 1 do
     151    ?>
     152      <SpaceShip position="<?lua print(2800 + math.random() * 2000 - 1000) ?>,<?lua print(2500+ math.random() * 1000 - 500) ?>,<?lua print(2500 + math.random() * 1000 - 500) ?>" >
     153        <templates>
     154          <Template link=spaceshipassff />
     155        </templates>
     156        <controller>
     157          <WaypointPatrolController alertnessradius=1000 team=0>
     158            <waypoints>
     159              <StaticEntity position="<?lua print(2800 + math.random() * 1000 - 500) ?>,<?lua print(2500 + math.random() * 1000 - 500) ?>,<?lua print(1500 + math.random() * 1000 - 500) ?>" />
     160            </waypoints>
     161          </WaypointPatrolController>
     162        </controller>
     163      </SpaceShip>
     164    <?lua end ?>
    161165
    162166    <Billboard position="2300, 4400, 2500" material="Examples/Flare" />
     
    172176    </EventDispatcher>
    173177
    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 ?>
     178    <?lua
     179      for i = 1, 12, 1 do
     180    ?>
     181      <SpaceShip position="<?lua print(2500 + math.random() * 500 - 250) ?>,<?lua print(4800 + math.random() * 500 - 250) ?>,<?lua print(2500 + math.random() * 500 - 250) ?>" >
     182        <templates>
     183          <Template link=spaceshipassff />
     184        </templates>
     185        <controller>
     186          <WaypointPatrolController name=attacker alertnessradius=1000 team=0 active=false>
     187            <waypoints>
     188              <StaticEntity position="<?lua print(2800 + math.random() * 500 - 250) ?>,<?lua print(2500 + math.random() * 500 - 250) ?>,<?lua print(1500 + math.random() * 500 - 250) ?>" />
     189              <StaticEntity position="<?lua print(5000 + math.random() * 500 - 250) ?>,<?lua print(0 + math.random() * 500 - 250) ?>,<?lua print(0 + math.random() * 500 - 250) ?>" />
     190              <StaticEntity position="<?lua print(7500 + math.random() * 500 - 250) ?>,<?lua print(-2500 + math.random() * 500 - 250) ?>,<?lua print(-1500 + math.random() * 500 - 250) ?>" />
     191            </waypoints>
     192          </WaypointPatrolController>
     193        </controller>
     194      </SpaceShip>
     195    <?lua end ?>
    195196
    196197    <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>
     198      <attached>
     199        <CheckPoint />
     200        <Model position="400, 0, 0" scale="40" mesh="DuBall2.mesh"/>
     201        <Model position="-400, 0, 0" scale="40" mesh="DuBall1.mesh"/>
     202      </attached>
    202203    </StaticEntity>
     204
    203205<!--
    204206    <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>
     207      <attached>
     208        <CheckPoint />
     209        <Model position="0,0,0" scale="5" mesh="Carrier.mesh"/>
     210        <Backlight
     211          mainstate=activity
     212          active=false
     213          scale=0.4
     214          name=bltest
     215          position=" 7.6, 0, 6"
     216          colour="0.2, 0.65, 1.0, 1.0"
     217          width=15
     218          length=1500
     219          lifetime=2
     220          elements=50
     221          trailmaterial="Trail/backlighttrail"
     222          turnontime=1
     223          turnofftime=1
     224          material="Flares/ThrusterFlare1"
     225        />
     226      </attached>
     227      <collisionShapes>
     228        <BoxCollisionShape position="70,0,-25"      halfExtents="150, 50, 25" />
     229        <BoxCollisionShape position="95,75,-16"     halfExtents="70, 10, 12" />
     230        <BoxCollisionShape position="95,-75,-16"    halfExtents="70, 10, 12" />
     231        <BoxCollisionShape position="77,47,30"      halfExtents="110, 2, 30" />
     232        <BoxCollisionShape position="77,-47,30"     halfExtents="110, 2, 30" />
     233        <BoxCollisionShape position="77,0,50"       halfExtents="110, 45, 6" />
     234        <BoxCollisionShape position="167,0,70"      halfExtents="17, 20, 20" />
     235      </collisionShapes>
    234236    </Destroyer>
    235237-->
     238
    236239    <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
     240      position          = "6500,-2000,-1000"
     241      collisionType     = dynamic
     242      mass              = 100000
     243      angularDamping    = 0.9999999
     244      health            = 1000
     245      maxhealth         = 1000
     246      initialhealth     = 1000
    244247    >
     248      <controller>
     249        <WaypointPatrolController team=1 />
     250      </controller>
     251      <attached>
     252        <Model mesh="Carrier.mesh" scale="5" />
     253        <Backlight
     254          mainstate=activity
     255          active=false
     256          scale=0.4
     257          name=bltest
     258          position=" 7.6, 0, 6"
     259          colour="0.2, 0.65, 1.0, 1.0"
     260          width=15
     261          length=1500
     262          lifetime=2
     263          elements=50
     264          trailmaterial="Trail/backlighttrail"
     265          turnontime=1
     266          turnofftime=1
     267          material="Flares/ThrusterFlare1"
     268        />
     269
     270        <?lua
     271          for i=0,8,1 do
     272        ?>
     273          <BlinkingBillboard
     274            position="<?lua print(200-270/8*i)?> ,15,2"
     275            material="Examples/Flare"
     276            colour="1.0, 0.5, 0.3"
     277            phase=<?lua print(-360/8*i)?>
     278            amplitude=0.1
     279            frequency=0.5
     280            quadratic=1
     281          />
     282
     283          <BlinkingBillboard
     284            position="<?lua print(200-270/8*i)?>,-15,2"
     285            material="Examples/Flare"
     286            colour="1.0, 0.5, 0.3"
     287            phase=<?lua print(-360/8*i)?>
     288            amplitude=0.1
     289            frequency=0.5
     290            quadratic=1
     291          />
     292        <?lua end ?>
     293
     294        <Backlight
     295          scale=1
     296          position=" 169, 75, -15"
     297          colour="1, 0.85, 0.5, 0.5"
     298          width=40
     299          length=1000
     300          lifetime=5
     301          elements=15
     302          trailmaterial="Trail/backlighttrail"
     303          material="Examples/Flare"
     304        />
     305        <Backlight
     306          scale=1
     307          position=" 169, -75, -15"
     308          colour="1, 0.85, 0.5, 0.5"
     309          width=40
     310          length=1000
     311          lifetime=5
     312          elements=15
     313          trailmaterial="Trail/backlighttrail"
     314          material="Examples/Flare" />
     315      </attached>
     316      <collisionShapes>
     317        <BoxCollisionShape position="70,0,-25"      halfExtents="150, 50, 25" />
     318        <BoxCollisionShape position="95,75,-16"     halfExtents="70, 10, 12" />
     319        <BoxCollisionShape position="95,-75,-16"    halfExtents="70, 10, 12" />
     320        <BoxCollisionShape position="77,47,30"      halfExtents="110, 2, 30" />
     321        <BoxCollisionShape position="77,-47,30"     halfExtents="110, 2, 30" />
     322        <BoxCollisionShape position="77,0,50"       halfExtents="110, 45, 6" />
     323        <BoxCollisionShape position="167,0,70"      halfExtents="17, 20, 20" />
     324      </collisionShapes>
     325    </Destroyer>
     326
     327    <?lua
     328      for i = 1, 10, 1 do
     329    ?>
     330      <SpaceShip position="<?lua print(6200 + math.random() * 2000 - 1000) ?>,<?lua print(-1500 + math.random() * 1000 - 500) ?>,<?lua print(-700 + math.random() * 1000 - 500) ?>" >
     331        <templates>
     332          <Template link=spaceshippirate />
     333        </templates>
    245334        <controller>
    246           <WaypointPatrolController team=1 />
     335          <WaypointPatrolController alertnessradius=1000 team=1>
     336            <waypoints>
     337              <StaticEntity position="<?lua print(6000 + math.random() * 1000 - 500) ?>,<?lua print(-2000 + math.random() * 1000 - 500) ?>,<?lua print(-1000 + math.random() * 1000 - 500) ?>" />
     338            </waypoints>
     339          </WaypointPatrolController>
    247340        </controller>
     341      </SpaceShip>
     342    <?lua end ?>
     343
     344    <?lua
     345      for i = 1, 200, 1 do
     346        x = math.random() * 100  + (i-70) * 100
     347        y = math.random() * 3000 - 1500
     348        z = math.random() * 3000 - 1500 + (i-100) * 10
     349        s = math.random() * 60 + 30
     350    ?>
     351      <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) ?>">
    248352        <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" />
     353          <Model position="0,0,0" scale=<?lua print(s) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
    309354        </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 ?>
     355      </MovableEntity>
     356    <?lua end ?>
     357
     358    <?lua
     359      elements = {"BodyDebris1.mesh", "CockpitDebris.mesh", "LightningGun.mesh", "WingDebris1.mesh", "WingDebris2.mesh", "satellitedish.mesh", "Thruster.mesh"}
     360      sizes = {4, 4, 4, 4, 4, 10, 20}
     361     
     362      elements.length = function()
     363        return table.getn(elements)
     364      end
     365     
     366      for i = 1, 150, 1 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 end ?>
    381379
    382380  </Scene>
Note: See TracChangeset for help on using the changeset viewer.