Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/invaders/data/levels/Invaders.oxw @ 9724

Last change on this file since 9724 was 9724, checked in by zifloria, 11 years ago

shooting and steering basics

File size: 2.1 KB
Line 
1<LevelInfo
2 name = "Invader Test"
3 description = "Invader Test"
4 tags = "test"
5 screenshot = "emptylevel.png"
6/>
7
8<?lua
9  include("stats.oxo")
10  include("HUDTemplates3.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?>
19
20<Level gametype = Invader>
21  <templates>
22    <Template link=lodtemplate_default />
23  </templates>
24  <?lua include("includes/notifications.oxi") ?>
25
26  <Scene
27    ambientlight = "0.8, 0.8, 0.8"
28    skybox       = "Orxonox/Starbox"
29  >
30
31    <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"/>
32    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=InvaderShip pawndesign=spaceshipinvader />
33    <MovableEntity
34      position = "-200,0,0"
35      velocity = "975.7, 0, 0"
36    >
37      <events>
38        <activity>
39          <EventListener event="start" />
40        </activity>
41      </events>
42      <attached>
43
44        <Model mass="1000" mesh="ast1.mesh" />
45      </attached>
46      <camerapositions>
47        <CameraPosition position="0,300,-100" direction="0, -1, 0" drag=false mouselook=true />
48      </camerapositions>
49    </MovableEntity>
50
51    <DistanceTrigger name="start" position="-200,0,0" target="Pawn" distance=10 stayActive="true" delay=0 />
52
53
54    <InvaderCenterPoint name=invadercenter />
55   
56    <?lua
57      for i = 1, 250, 1
58      do
59      j = math.random()
60    ?>
61
62    <MovableEntity
63      position = "<?lua print(math.random()* 15000 - 1000) ?>,-1000,<?lua print(math.random() * 12000 - 4000) ?>"
64      collisionType = dynamic
65      linearDamping = 0.8
66      angularDamping = 0
67      scale = "<?lua print(j * 150)?>"
68      collisiondamage = 1
69      enablecollisiondamage = true
70    >
71      <attached>
72        <Model mass="<?lua print(j * 1000) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
73      </attached>
74      <collisionShapes>
75        <SphereCollisionShape radius="<?lua print(j * 350) ?>" />
76      </collisionShapes>
77    </MovableEntity>
78
79    <?lua
80      end
81    ?>
82   
83  </Scene>
84</Level>
85
Note: See TracBrowser for help on using the repository browser.