Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/levelMichael/data/levels/maxim.oxw @ 9806

Last change on this file since 9806 was 9664, checked in by landauf, 11 years ago

eol-style native

  • Property svn:eol-style set to native
File size: 3.6 KB
Line 
1<LevelInfo
2 name = "Maxim's Test"
3 description = "Intelligent Formation"
4 tags = "test"
5/>
6
7<?lua
8  include("stats.oxo")
9  include("HUDTemplates3.oxo")
10  include("templates/lodInformation.oxt")
11?>
12
13<?lua
14  include("templates/spaceshipAssff.oxt")
15  include("templates/spaceshipPirate.oxt")
16  include("templates/spaceshipSwallow.oxt")
17  include("templates/spaceshipTransporter.oxt")
18?>
19
20<Level
21 gametype = "Mission"
22>                 
23  <templates>
24    <Template link=lodtemplate_default />
25  </templates>
26  <?lua include("includes/notifications.oxi") ?>
27
28  <NotificationQueueCEGUI
29    name="narrative"
30    targets="simpleNotification"
31    size=3
32    displayTime=3.9
33    position="0.2, 0, 0.1, 0"
34    fontSize="23"
35    fontColor="0.3, 1, 0.2, 0.8"
36    alignment="HorzCentred"
37    displaySize="0.6, 0, 0, 0"
38    />
39
40  <Scene
41    ambientlight = "0.8, 0.8, 0.8"
42    skybox       = "Orxonox/skyBoxMoreNebula"
43  >
44
45  <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"/>
46
47  <TeamSpawnPoint team=0 position="800,700,600" direction="-1,0,0" spawnclass=SpaceShip pawndesign=spaceshipswallow/>
48
49  <!-- TRIGGERS -->
50    <DistanceTrigger name="FormationInit" position="800,700,600"  target="Pawn" distance=60 stayActive="true" delay=0.1 />
51    <DistanceTrigger name="LetsGo"        position="200,-200,1000" target="Pawn" distance=180 stayActive="true" delay=0.1 />
52    <BlinkingBillboard colour="1,1,0.05" position="200,-200,1000" frequency=0.6 amplitude=3 material="Flares/lensflare" />
53        <DistanceTrigger name="Fight"        position="-600,3000,-2000" target="Pawn" distance=180 stayActive="true" delay=0.1 />
54    <BlinkingBillboard colour="0,0,1" position="-600,3000,-2000" frequency=0.6 amplitude=3 material="Flares/lensflare" />
55
56
57
58    <Script code="formationcontroller formationflight true" onLoad="false">
59        <events>
60            <trigger>
61                <EventListener event=FormationInit />
62            </trigger>
63        </events>
64    </Script> <!-- !!! activates formation behaviour !!! -->
65
66    <Script code="artificialcontroller setbotlevel 5" onLoad="false">
67        <events>
68            <trigger>
69                <EventListener event=FormationInit />
70            </trigger>
71        </events>
72    </Script>
73
74    <SimpleNotification message="Let's go!">
75        <events>
76            <trigger>
77                <EventListener event="LetsGo" />
78            </trigger>
79        </events>
80    </SimpleNotification>
81
82
83
84
85<!-- ADDING FORMATION: 2 Swallows -->
86<?lua for i=0,1,1 do
87?>
88    <SpaceShip position="<?lua print(400+i*200) ?>,-200,1000" lookat="-1300,-600,900" visible="true">
89        <templates>
90            <Template link=spaceshipswallow /> <!--spaceshipTransporter spaceshippirate-->
91        </templates>
92        <controller>
93            <AIController team=0>
94                <events>
95                    <activity>
96                        <EventListener event="LetsGo" />
97                     </activity>
98                </events>
99            </AIController>
100        </controller>
101    </SpaceShip>
102<?lua end ?>
103
104<?lua for i=0,2,1 do
105?>
106
107
108<!-- ENEMY SWALLOWS -->
109    <SpaceShip position="<?lua print(-400+i*200) ?>,3000,-2000" lookat="-1300,-600,900" visible="true">
110        <templates>
111            <Template link=spaceshipswallow />
112        </templates>
113        <controller>
114            <AIController team=1>
115                <events>
116                    <activity>
117                        <EventListener event="Fight" />
118                     </activity>
119                </events>
120            </AIController>
121        </controller>
122    </SpaceShip>
123<?lua end ?>
124
125  </Scene>
126</Level>
Note: See TracBrowser for help on using the repository browser.