[6257] | 1 | <?lua |
---|
| 2 | include("stats.oxo") |
---|
| 3 | include("hudtemplates3.oxo") |
---|
| 4 | ?> |
---|
| 5 | |
---|
| 6 | <?lua |
---|
| 7 | include("templates/spaceship_assff.oxt") |
---|
| 8 | include("templates/spaceship_pirate.oxt") |
---|
| 9 | ?> |
---|
| 10 | |
---|
| 11 | <Level |
---|
| 12 | name = "Sample" |
---|
| 13 | description = "Just a few tests" |
---|
| 14 | > |
---|
| 15 | <Scene |
---|
| 16 | ambientlight = "0.8, 0.8, 0.8" |
---|
| 17 | skybox = "Orxonox/Starbox" |
---|
| 18 | > |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | <AmbientSound ambientSource="Earth.ogg" loop="true" play="true" /> |
---|
| 22 | |
---|
| 23 | <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" /> |
---|
| 24 | <?lua |
---|
| 25 | elements = {"asteroid_ice.mesh", "asteroid_UV.mesh", "ast1.mesh", "ast2.mesh", "ast3.mesh", "ast4.mesh", "ast5.mesh", "ast6.mesh"} |
---|
| 26 | elements.length = function() |
---|
| 27 | return table.getn(elements) |
---|
| 28 | end |
---|
| 29 | for i = 1, 100, 1 |
---|
| 30 | do |
---|
| 31 | x = math.random() * 200 + (i) * 200 |
---|
| 32 | y = math.random() * 3000 - 1500 |
---|
| 33 | z = math.random() * 3000 - 1500 + (i-100) * 10 |
---|
| 34 | s = math.random() * 60 + 30 |
---|
| 35 | e = math.floor(math.random()*elements.length()+1) |
---|
| 36 | ?> |
---|
| 37 | |
---|
| 38 | <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() * 100 - 15) ?>"> |
---|
| 39 | <attached> |
---|
| 40 | <Model position="0,0,0" scale=<?lua print(s) ?> mesh="<?lua print(elements[e])?>" /> |
---|
| 41 | </attached> |
---|
| 42 | </MovableEntity> |
---|
| 43 | <?lua |
---|
| 44 | end |
---|
| 45 | ?> |
---|
| 46 | |
---|
| 47 | <?lua |
---|
| 48 | for i = 1, 200, 1 |
---|
| 49 | do |
---|
| 50 | x = math.random() * 100 + i*100 |
---|
| 51 | y = math.random() * 3000 - 1500 |
---|
| 52 | z = math.random() * 3000 - 1500 + (i-100) * 10 |
---|
| 53 | s = math.random() * 60 + 30 |
---|
| 54 | ?> |
---|
| 55 | <ParticleSpawner position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" source="Orxonox/Steam" lifetime=3.0 loop=1 /> |
---|
| 56 | |
---|
| 57 | <!--<Billboard material="Test/Fog" position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" color="1, 1, 1, 0.01" scale="20" /> |
---|
| 58 | --> |
---|
| 59 | <?lua |
---|
| 60 | end |
---|
| 61 | ?> |
---|
| 62 | |
---|
| 63 | <?lua |
---|
| 64 | elements = {"BodyDebris1.mesh", "CockpitDebris.mesh", "LightningGun.mesh", "WingDebris1.mesh", "WingDebris2.mesh", "satellitedish.mesh", "Thruster.mesh"} |
---|
| 65 | sizes = {4, 4, 4, 4, 4, 10, 20} |
---|
| 66 | elements.length = function() |
---|
| 67 | return table.getn(elements) |
---|
| 68 | end |
---|
| 69 | for i = 1, 100, 1 |
---|
| 70 | do |
---|
| 71 | x = math.random() * 750 - 4500 |
---|
| 72 | y = math.random() * 1000 + 2000 |
---|
| 73 | z = math.random() * 500 + 1000 |
---|
| 74 | e = math.floor(math.random()*elements.length()+1) |
---|
| 75 | ?> |
---|
| 76 | |
---|
| 77 | <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) ?>"> |
---|
| 78 | <attached> |
---|
| 79 | <Model position="0,0,0" scale="<?lua print(sizes[e]) ?>" mesh="<?lua print( elements[e]) ?>" /> |
---|
| 80 | </attached> |
---|
| 81 | </MovableEntity> |
---|
| 82 | <?lua |
---|
| 83 | end |
---|
| 84 | ?> |
---|
| 85 | |
---|
| 86 | |
---|
| 87 | <SpawnPoint position="0,0,100" spawnclass=SpaceShip pawndesign=spaceshipassff /> |
---|
| 88 | </Scene> |
---|
| 89 | </Level> |
---|