Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/Asteroid_HS17/data/levels/Asteroids.oxw @ 11528

Last change on this file since 11528 was 11528, checked in by vyang, 7 years ago

Spawn Funktion fuer die Asteroiden veraendert

File size: 2.1 KB
Line 
1<LevelInfo
2 name = "Asteroids"
3 description = "Try to prevent asteroids from colliding into your spaceshuttle. Be prepared to dodge all asteroids or destroy them."
4 tags = "asteroids, minigame"
5 screenshot = "emptylevel.png"
6/>
7
8
9<?lua
10  include("stats.oxo")
11  include("templates/lodInformation.oxt")
12?>
13
14<?lua
15  include("templates/spaceshipAssff2.oxt")
16  include("templates/spaceshipPirate.oxt")
17  include("templates/spaceshipInvader.oxt")
18  include("templates/enemyInvader.oxt")
19  include("overlays/InvaderHUD.oxo")
20?>
21
22<Level
23  plugins = invader
24  gametype = Invader
25>
26  <templates>
27    <Template link=lodtemplate_default />
28  </templates>
29  <?lua include("includes/notifications.oxi") ?>
30
31    <!-- ambientlight = "0.8, 0.8, 0.8"
32    skybox       = "Orxonox/Starbox" -->
33  <Scene
34    ambientlight = "0.8, 0.7, 0.4"
35    skybox     = "Orxonox/skyBoxBasic"
36  >
37
38    <!-- <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"/> -->
39    <Light type=directional position="1100, 11000, -7000" lookat="0, 0, 0" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
40    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=InvaderShip pawndesign=spaceshipinvader />
41
42    <DistanceTrigger name="start" position="-200,0,0" target="Pawn" distance=10 stayActive="true" delay=0 />
43
44
45    <InvaderCenterPoint name=invadercenter />
46   
47    <?lua
48      for i = 1, 300, 1 do
49        j = math.random()
50    ?>
51
52    <MovableEntity
53      position = "<?lua print(math.random()* 40000 + 1000) ?>,-1000,<?lua print(math.random() * 4000 - 2000) ?>"
54      collisionType = dynamic
55      linearDamping = 0.8
56      angularDamping = 0
57      scale = "<?lua print(j * 150)?>"
58      collisiondamage = 0
59      enablecollisiondamage = true
60    >
61      <attached>
62        <Model mass="<?lua print(j * 1000) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
63      </attached>
64      <collisionShapes>
65        <SphereCollisionShape radius="<?lua print(j * 350) ?>" />
66      </collisionShapes>
67    </MovableEntity>
68
69    <?lua
70      end
71    ?>
72   
73  </Scene>
74</Level>
75
Note: See TracBrowser for help on using the repository browser.