Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/network3/data/levels/tutorial.oxw @ 7318

Last change on this file since 7318 was 7193, checked in by dafrick, 14 years ago

Added NotificationDispatcher, class that can, upon being triggered, dispatch (send/display) a specified Notification.
Additionally a NotificationDispatcher called CommandNotification, that, upon being triggered, displays a Notification with a message and the name of the key that the command is mapped to. It is envisioned to be used in the, soon to be, tutorial level.
Also: Small bugfix in Notification.

  • Property svn:eol-style set to native
File size: 5.8 KB
Line 
1<?lua
2  include("hudtemplates3.oxo")
3  include("stats.oxo")
4  include("templates/spaceship_assff.oxt")
5  include("templates/lodinformation.oxt")
6?>
7
8<Level
9 name         = "Presentation"
10 description  = "A simple testlevel"
11>
12  <templates>
13    <Template link=lodtemplate_default />
14  </templates>
15
16  <NotificationQueue
17   name   = "notification"
18   position = "0.05, 0.05"
19   font   = "VeraMono"
20   textsize = 0.020
21   length   = 3
22   width  = 50
23  />
24
25  <Scene
26   ambientlight = "0.5, 0.5, 0.5"
27   skybox       = "Orxonox/skypanoramagen1"
28  >
29
30      <CommandNotification preMessage="Press '" postMessage="' to fire your primary weapon." command="fire 0">
31        <events>
32            <trigger>
33                <DistanceTrigger name=trigger position="0,0,-100" distance=10 target="Pawn">
34                    <attached>
35                        <Billboard position="0,0,0" colour="1.0,1.0,0" material="Examples/Flare" />
36                    </attached>
37                </DistanceTrigger>
38            </trigger>
39        </events>
40    </CommandNotification>
41 
42<Drone name="meineDrohne" primarythrust="80" auxilarythrust="10" rotationthrust="10" mass= "50" linearDamping = "0.9" angularDamping = "0.7">
43  <attached>
44    <Model scale="1" mesh="drone.mesh"/>
45  </attached>
46  <collisionShapes>
47    <BoxCollisionShape position="0,0,0"      halfExtents="10, 10, 10" />
48  </collisionShapes>
49</Drone>
50
51    <Drone name="meineDrohne" primarythrust="80" auxilarythrust="10" rotationthrust="10" mass= "50" linearDamping = "0.9" angularDamping = "0.7">
52      <attached>
53        <Model scale="1" mesh="rocket.mesh"/>
54      </attached>
55      <collisionShapes>
56        <BoxCollisionShape position="0,0,0"      halfExtents="10, 10, 10" />
57      </collisionShapes>
58    </Drone>
59
60    <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" />
61
62    <Model mesh="hs-w01.mesh" scale=10 position="0,0,-100" />
63    <Model mesh="hs-w01s.mesh" scale=10 position="0,0,-100" />
64
65    <?lua
66      for i = 1, 10, 1 do
67    ?>
68      <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
69    <?lua end ?>
70
71    <GlobalShader compositor="Bloom" visible=false>
72      <events>
73        <visibility>
74          <DistanceTrigger position="0,0,0" distance=30 target="Spectator" switch=true />
75        </visibility>
76      </events>
77    </GlobalShader>
78    <Model position="0,0,0" scale=8 mesh="ast1.mesh" />
79    <StaticEntity position="0,0,0" collisionType=static>
80      <collisionShapes>
81        <SphereCollisionShape radius="20" />
82      </collisionShapes>
83    </StaticEntity>
84
85<!--
86    <?lua
87      for i = 1, 70, 1 do
88    ?>
89      <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * 1000 + 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
90        <attached>
91          <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
92        </attached>
93      </MovableEntity>
94      <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * -1000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
95        <attached>
96          <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
97        </attached>
98      </MovableEntity>
99
100      <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * 1000 + 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
101        <attached>
102          <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
103        </attached>
104      </MovableEntity>
105      <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * -1000 - 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
106        <attached>
107          <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
108        </attached>
109      </MovableEntity>
110
111      <MovableEntity position="<?lua print(math.random() * 1000 + 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
112        <attached>
113          <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
114        </attached>
115      </MovableEntity>
116      <MovableEntity position="<?lua print(math.random() * -1000 - 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
117        <attached>
118          <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
119        </attached>
120      </MovableEntity>
121    <?lua end ?>
122-->
123
124  </Scene>
125</Level>
Note: See TracBrowser for help on using the repository browser.