Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/dockingsystem2/data/levels/docking.oxw @ 8197

Last change on this file since 8197 was 8197, checked in by dafrick, 13 years ago

Replacing getNick() with getName(). nick_ in HumanPlayer is only needed to synchronize the player name over the network.

File size: 5.1 KB
Line 
1<LevelInfo
2 name = "Transporter"
3 description = "Level with a Transporter. Demostrates the docking system."
4 tags = ""
5/>
6
7<?lua
8  include("HUDTemplates3.oxo")
9  include("stats.oxo")
10  include("templates/spaceshipAssff.oxt")
11  include("templates/lodInformation.oxt")
12?>
13
14<Level
15 name         = "Transporter"
16 description  = "Docking example level"
17>
18  <templates>
19    <Template link=lodtemplate_default />
20  </templates>
21
22  <Scene
23   ambientlight = "0.5, 0.5, 0.5"
24   skybox       = "Orxonox/skypanoramagen1"
25  >
26
27    <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" />
28
29    <?lua for i = 1, 10, 1 do ?>
30      <SpawnPoint position="<?lua print(math.random() * 500 - 250) ?>,<?lua print(math.random() * 500 - 250) ?>,<?lua print(math.random() * 500 - 250) ?>" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
31    <?lua end ?>
32   
33    <Destroyer
34      position          = "100,150,0"
35      collisionType     = dynamic
36      mass              = 100000
37      velocity          = "0,0,0"
38      angularDamping    = 0.9999999
39      health            = 10000
40      maxhealth         = 10000
41      initialhealth     = 10000
42    >
43
44      <attached>
45        <Dock>
46            <effects>
47                <DockToShip />
48            </effects>
49            <events>
50                <execute>
51                    <EventListener event="dockMe" />
52                </execute>
53            </events>
54            <attached>
55                <DistanceMultiTrigger position="0,0,0" distance="20" target="Pawn" name="dockMe" />
56                <Billboard material="Examples/Flare" colour="1.0, 0, 0" />
57            </attached>
58        </Dock>
59     
60        <TeamSpawnPoint team=1 position="150,0,7" direction="-1,0,0" roll=90 yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
61        <TeamSpawnPoint team=1 position="0,0,7" lookat="-1,0,0" roll="90"  yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
62        <TeamSpawnPoint team=1 position="-50,0,7" lookat="-1,0,0" roll="90" yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
63        <TeamSpawnPoint team=1 position="100,0,7" lookat="-1,0,0" roll="90" yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
64        <TeamSpawnPoint team=1 position="50,0,7" lookat="-1,0,0" roll="90" yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
65        <?lua for i = 1, 100, 1 do ?>
66          <TeamSpawnPoint
67            team=0
68            position="<?lua print((math.random() * 500 + 500) * (math.floor(math.random() + 0.5) * 2 - 1)) ?>,<?lua print((math.random() * 500 + 500) * (math.floor(math.random() + 0.5) * 2 - 1)) ?>,<?lua print((math.random() * 500 + 500) * (math.floor(math.random() + 0.5) * 2 - 1)) ?>"
69            lookat="0,0,0"
70            spawnclass=SpaceShip
71            pawndesign=spaceshipassff
72          />
73        <?lua end ?>
74
75        <Model mesh="Carrier.mesh" scale="5" />
76        <Backlight
77          mainstate=activity
78          active=false
79          scale=0.4
80          name=bltest
81          position=" 7.6, 0, 6"
82          colour="0.2, 0.65, 1.0, 1.0"
83          width=15
84          length=1500
85          lifetime=2
86          elements=50
87          trailmaterial="Trail/backlighttrail"
88          turnontime=1
89          turnofftime=1
90          material="Flares/ThrusterFlare1"
91        />
92        <?lua for i=0,8,1 do ?>
93          <BlinkingBillboard
94            position="<?lua print(200-270/8*i)?> ,15,2"
95            material="Examples/Flare"
96            colour="1.0, 0.5, 0.3"
97            phase="<?lua print(-360/8*i)?>"
98            amplitude=0.1
99            frequency=0.5
100            quadratic=1
101          />
102
103          <BlinkingBillboard
104            position="<?lua print(200-270/8*i)?>,-15,2"
105            material="Examples/Flare"
106            colour="1.0, 0.5, 0.3"
107            phase="<?lua print(-360/8*i)?>"
108            amplitude=0.1
109            frequency=0.5
110            quadratic=1
111          />
112        <?lua end ?>
113
114        <Backlight
115          scale=1
116          position=" 169, 75, -15"
117          colour="1, 0.85, 0.5, 0.5"
118          width=40
119          length=1000
120          lifetime=5
121          elements=15
122          trailmaterial="Trail/backlighttrail"
123          material="Examples/Flare"
124        />
125        <Backlight
126          scale=1
127          position=" 169, -75, -15"
128          colour="1, 0.85, 0.5, 0.5"
129          width=40
130          length=1000
131          lifetime=5
132          elements=15
133          trailmaterial="Trail/backlighttrail"
134          material="Examples/Flare" />
135      </attached>
136      <collisionShapes>
137        <BoxCollisionShape position="70,0,-25"      halfExtents="150, 50, 25" />
138        <BoxCollisionShape position="95,75,-16"     halfExtents="70, 10, 12" />
139        <BoxCollisionShape position="95,-75,-16"    halfExtents="70, 10, 12" />
140        <BoxCollisionShape position="77,47,30"      halfExtents="110, 2, 30" />
141        <BoxCollisionShape position="77,-47,30"     halfExtents="110, 2, 30" />
142        <BoxCollisionShape position="77,0,50"       halfExtents="110, 45, 6" />
143        <BoxCollisionShape position="167,0,70"      halfExtents="17, 20, 20" />
144      </collisionShapes>
145    </Destroyer>
146   
147
148  </Scene>
149</Level>
Note: See TracBrowser for help on using the repository browser.