Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9010


Ignore:
Timestamp:
Dec 20, 2011, 10:41:35 PM (13 years ago)
Author:
jo
Message:

First draft. How it works: activate the bots by flying through the blinking light. Then press '1' to force them to follow you press '1' again to toggle this behaviour. The formation mode can be switched by pressing '2'. Enemies have not been added yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2011/data/levels/presentationHS11.oxw

    r9009 r9010  
    1414  include("templates/spaceshipAssff.oxt")
    1515  include("templates/spaceshipPirate.oxt")
     16  include("templates/spaceshipSwallow.oxt")
    1617?>
    1718
    1819<Level
    19  gametype = "TeamGametype"
     20 gametype = "Mission"
    2021>
    2122  <templates>
     
    2930  >
    3031
    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     <TeamSpawnPoint team=0 position="800,700,600" direction="-1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
     32  <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"/>
    3333
    34     <Script code="formationcontroller formationflight true" onLoad="true">
    35     </Script> <!-- activate formation behaviour-->
     34  <TeamSpawnPoint team=0 position="800,700,600" direction="-1,0,0" spawnclass=SpaceShip pawndesign=spaceshipswallow/>
    3635
    37     <Script code="artificialcontroller setbotlevel 0.1" onLoad="true">
     36  <!-- TRIGGERS -->
     37    <DistanceTrigger name="FormationInit" position="800,700,600"  target="Pawn" distance=60 stayActive="true" delay=0.1 />
     38    <DistanceTrigger name="LetsGo"        position="800,700,1000" target="Pawn" distance=60 stayActive="true" delay=0.1 />
     39
     40
     41    <Script code="formationcontroller formationflight true" onLoad="false">
     42        <events>
     43            <trigger>
     44                <EventListener event=FormationInit />
     45            </trigger>
     46        </events>
     47    </Script> <!-- !!! activates formation behaviour !!! -->
     48
     49    <Script code="artificialcontroller setbotlevel 0.1" onLoad="false">
     50        <events>
     51            <trigger>
     52                <EventListener event=FormationInit />
     53            </trigger>
     54        </events>
    3855    </Script> <!-- make bots "friendly", doesn't work yet :-( -->
    3956
    40     <SpaceShip position="1000,-500,2000" lookat="-1300,-600,900" name="attacker" visible="true">
     57<!-- ADDING FORMATION -->
     58<?lua for i=0,4,1 do
     59?>
     60    <SpaceShip position="<?lua print(400+i*200) ?>,-200,1000" lookat="-1300,-600,900" visible="true">
    4161        <!--events>
    4262            <visibility>
     
    4565        </events-->
    4666        <templates>
    47             <Template link=spaceshipassff /> <!--spaceshipTransporter spaceshippirate-->
     67            <Template link=spaceshipswallow /> <!--spaceshipTransporter spaceshippirate-->
    4868        </templates>
    4969        <controller>
    5070            <AIController team=0>
    51                 <!--events>
     71                <events>
    5272                    <activity>
    53                         <EventListener event="attack" />
     73                        <EventListener event="LetsGo" />
    5474                     </activity>
    55                 </events-->
     75                </events>
    5676            </AIController>
    5777        </controller>
    5878    </SpaceShip>
    59 
     79<?lua end ?>
    6080
    6181
    6282
    6383<!-- ACTUAL LEVEL -->
     84
     85<BlinkingBillboard position="800,700,1000" frequency=0.6 amplitude=3 material="Flares/lensflare" colour="1,1,0.05">
     86
     87</BlinkingBillboard>
    6488
    6589<!-- Generate asteroid field and asteroid belt -->
     
    7498
    7599
    76 <!--            asteroidBelt(0, 0, 0, 0, 0, 70, 100, 200, 22000, 20000, 500, 1) -->
    77100  </Scene>
    78101</Level>
Note: See TracChangeset for help on using the changeset viewer.