Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

Extending DistanceTrigger (both the normal and the MultiTrigger version). DistanceTriggerBeacons, can now also be used to exclude specific objects from triggering a DistanceTrigger.
Beware: The syntax for the DistanceTrigger, used with a DistanceTriggerBeacon has changed.
It was: <DistanceTrigger target="DistanceTriggerBeacon" targetname="someBeacon" />
And is now: <DistanceTrigger target="WhateverTargetYouWantYourTriggerToReactTo" beaconMode="identify" targetname="someBeacon" />
Consult the documentation in DistanceMultiTrigger for it's specific usage, the DistanceTrigger works analogously.

File size: 5.2 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                <DistanceTrigger position="0,0,0" distance="20" target="Pawn" beaconMode="exclude" targetname="beacon1" name="dockMe" />
56                <Billboard material="Examples/Flare" colour="1.0, 0, 0" />
57            </attached>
58        </Dock>
59        <DistanceTriggerBeacon name="beacon1" />
60     
61        <TeamSpawnPoint team=1 position="150,0,7" direction="-1,0,0" roll=90 yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
62        <TeamSpawnPoint team=1 position="0,0,7" lookat="-1,0,0" roll="90"  yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
63        <TeamSpawnPoint team=1 position="-50,0,7" lookat="-1,0,0" roll="90" yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
64        <TeamSpawnPoint team=1 position="100,0,7" lookat="-1,0,0" roll="90" yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
65        <TeamSpawnPoint team=1 position="50,0,7" lookat="-1,0,0" roll="90" yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
66        <?lua for i = 1, 100, 1 do ?>
67          <TeamSpawnPoint
68            team=0
69            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)) ?>"
70            lookat="0,0,0"
71            spawnclass=SpaceShip
72            pawndesign=spaceshipassff
73          />
74        <?lua end ?>
75
76        <Model mesh="Carrier.mesh" scale="5" />
77        <Backlight
78          mainstate=activity
79          active=false
80          scale=0.4
81          name=bltest
82          position=" 7.6, 0, 6"
83          colour="0.2, 0.65, 1.0, 1.0"
84          width=15
85          length=1500
86          lifetime=2
87          elements=50
88          trailmaterial="Trail/backlighttrail"
89          turnontime=1
90          turnofftime=1
91          material="Flares/ThrusterFlare1"
92        />
93        <?lua for i=0,8,1 do ?>
94          <BlinkingBillboard
95            position="<?lua print(200-270/8*i)?> ,15,2"
96            material="Examples/Flare"
97            colour="1.0, 0.5, 0.3"
98            phase="<?lua print(-360/8*i)?>"
99            amplitude=0.1
100            frequency=0.5
101            quadratic=1
102          />
103
104          <BlinkingBillboard
105            position="<?lua print(200-270/8*i)?>,-15,2"
106            material="Examples/Flare"
107            colour="1.0, 0.5, 0.3"
108            phase="<?lua print(-360/8*i)?>"
109            amplitude=0.1
110            frequency=0.5
111            quadratic=1
112          />
113        <?lua end ?>
114
115        <Backlight
116          scale=1
117          position=" 169, 75, -15"
118          colour="1, 0.85, 0.5, 0.5"
119          width=40
120          length=1000
121          lifetime=5
122          elements=15
123          trailmaterial="Trail/backlighttrail"
124          material="Examples/Flare"
125        />
126        <Backlight
127          scale=1
128          position=" 169, -75, -15"
129          colour="1, 0.85, 0.5, 0.5"
130          width=40
131          length=1000
132          lifetime=5
133          elements=15
134          trailmaterial="Trail/backlighttrail"
135          material="Examples/Flare" />
136      </attached>
137      <collisionShapes>
138        <BoxCollisionShape position="70,0,-25"      halfExtents="150, 50, 25" />
139        <BoxCollisionShape position="95,75,-16"     halfExtents="70, 10, 12" />
140        <BoxCollisionShape position="95,-75,-16"    halfExtents="70, 10, 12" />
141        <BoxCollisionShape position="77,47,30"      halfExtents="110, 2, 30" />
142        <BoxCollisionShape position="77,-47,30"     halfExtents="110, 2, 30" />
143        <BoxCollisionShape position="77,0,50"       halfExtents="110, 45, 6" />
144        <BoxCollisionShape position="167,0,70"      halfExtents="17, 20, 20" />
145      </collisionShapes>
146    </Destroyer>
147   
148
149  </Scene>
150</Level>
Note: See TracBrowser for help on using the repository browser.