Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10841 for code/branches


Ignore:
Timestamp:
Nov 23, 2015, 5:01:15 PM (9 years ago)
Author:
paulsc
Message:

Worked on retaliation level.

Location:
code/branches/campaignHS15/data/levels
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/campaignHS15/data/levels/shuttleAttack.oxw

    r10824 r10841  
    192192
    193193
    194     <EventMultiTrigger name="spawntrigger">
     194    <EventMultiTrigger name="spawntrigger" activations=1>
    195195        <events>
    196196            <trigger>
  • code/branches/campaignHS15/data/levels/shuttleRetaliation.oxw

    r10823 r10841  
    4242    <?lua
    4343
     44        units = 1
     45
    4446        --[[ Coordinates in (y,z,x). NOTE: Indexing starts at 1 in lua! Don´t forget to adapt the for loops, too! ]]--
    4547        cCenter = {0, 0, 0}
    46         cSpawn = {-50, 0, 0}
    47 
    48         cField1 = {400, 0, 2500}
    49         cField2 = {400, 0, -2500}
    50         cPlanet1 = {8000, -2000, 15000}
    51         cPlanet2 = {-20000, 4000, -1000}
     48        cSpawn = {-2000, 2000, 2000}
     49        cSector = {2000, 2000, 2000}
     50        cBeacon = {1500, 1500, 1500}
     51
     52        cAlly1 = {-100, 0, 0}
     53        cEnemy1 = {1000, 0, 0}
     54
     55        cPlanet1 = {-9000, -8000, 14000}
     56        cPlanet2 = {12000, -1500, -10000}
     57
     58        cEnemyBasePlanet = {-20000, -5500, -8000}
     59
     60        cField1 = {-5000, -4000, -3000}
     61        cField2 = {4000, 2000, 4500}
     62
    5263
    5364        --[[ Function to print Coordinates. Quotes not included! ]]--
     
    6374    >
    6475
    65     <SpawnPoint name="playerSpawn" team=0 position="<?lua printC(cSpawn) ?>" lookat="<?lua printC(cCenter) ?>" spawnclass=SpaceShip pawndesign=spaceshipescort />
     76    <TeamSpawnPoint name="playerSpawn" team=0 position="<?lua printC(cSpawn) ?>" lookat="<?lua printC(cCenter) ?>" spawnclass=SpaceShip pawndesign=spaceshipescort />
    6677
    6778    <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" />
     
    7283
    7384    <GlobalQuest id="quest1">
    74         <QuestDescription title="Quest 1" description="" failMessage="" completeMessage="" />
     85        <QuestDescription title="Enter Sector 5C" description="It is time to retaliate against the aggressors. Get back to Sector 5C to kill every last one of them!" failMessage="" completeMessage="" />
    7586        <hints>
    7687        </hints>
     
    8091    </GlobalQuest>
    8192
     93    <GlobalQuest id="quest2">
     94        <QuestDescription title="Find them" description="It seems they have hiden themselves, that is, their whole civilization, in fear of retaliation. Our scientists presume some cloaking technology to be in use. Look out for a way to make the aggressors visible!" failMessage="" completeMessage="" />
     95        <hints>
     96            <QuestHint id="quest2hint1">
     97                <QuestDescription title="The detector beacon" description="Our scientists claim cloaking is generally toggled by a visible Switch called a detector beacon. Try to find a bright light in your Area and approach it" />
     98            </QuestHint>
     99        </hints>
     100        <complete-effects>
     101            <AddQuest questId="quest3" />
     102        </complete-effects>
     103    </GlobalQuest>
     104
     105    <GlobalQuest id="quest3">
     106        <QuestDescription title="Fight their army" description="You have successfully uncovered their civilization and home planet, and it is much worse than we thought... they came prepared! You have to fight their army to fulfill your mission." failMessage="" completeMessage="" />
     107        <hints>
     108        </hints>
     109        <complete-effects>
     110            <AddQuest questId="quest4" />
     111        </complete-effects>
     112    </GlobalQuest>
     113
     114    <GlobalQuest id="quest4">
     115        <QuestDescription title="Destroy their civilisation" description="You have successfully uncovered their civilization and home planet, and it is much worse than we thought... they came prepared! You have to fight their army to fulfill your mission." failMessage="" completeMessage="" />
     116        <hints>
     117        </hints>
     118    </GlobalQuest>
     119
    82120    <!--EVENTS AND TRIGGERS
    83121        Usable events and triggers:
     
    85123    -->
    86124
    87     <EventMultiTrigger name="spawntrigger">
     125    <EventMultiTrigger name="spawntrigger" activations=1>
    88126        <events>
    89127            <trigger>
     
    92130        </events>
    93131    </EventMultiTrigger>
     132
     133    <DistanceTrigger name="reachedSector" position="<?lua printC(cSector) ?>" distance=1000 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true />
     134
     135    <EventMultiTrigger name="hintBeacon">
     136        <events>
     137            <trigger>
     138                <EventTrigger stayactive="true" delay=90 >
     139                   <events>
     140                      <trigger>
     141                         <EventListener event="reachedSector" />
     142                      </trigger>
     143                   </events>
     144                </EventTrigger>
     145            </trigger>
     146        </events>
     147    </EventMultiTrigger>
     148
     149    <DistanceTrigger name="cloakBeacon" position="<?lua printC(cBeacon) ?>" distance=100 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true />
    94150
    95151    <!--TODO: Complete the DistanceTriggers for completing/succeeding correctly! -->
     
    140196    </QuestEffectBeacon>
    141197
     198    <QuestEffectBeacon times=1>
     199        <effects>
     200            <CompleteQuest questId="quest1" />
     201        </effects>
     202        <events>
     203            <execute>
     204                <EventListener event="reachedSector" />
     205            </execute>
     206        </events>
     207    </QuestEffectBeacon>
     208
     209    <QuestEffectBeacon times=1>
     210        <effects>
     211            <AddQuestHint hintId="quest2hint2" />
     212        </effects>
     213        <events>
     214            <execute>
     215                <EventListener event="hintBeacon" />
     216            </execute>
     217        </events>
     218    </QuestEffectBeacon>
     219
     220    <QuestEffectBeacon times=1>
     221        <effects>
     222            <CompleteQuest questId="quest2" />
     223        </effects>
     224        <events>
     225            <execute>
     226                <EventListener event="cloakBeacon" />
     227            </execute>
     228        </events>
     229    </QuestEffectBeacon>
     230
    142231    <!--NOTIFICATIONS -->
    143232
    144     <SimpleNotification broadcast="true" message="Welcome, Commander.">
     233    <SimpleNotification broadcast="true" message="Welcome, Commander. It is time to retaliate!">
    145234        <events>
    146235            <trigger>
     
    156245    </SimpleNotification>
    157246
    158     <!--STATIONS -->
    159 
     247    <SimpleNotification broadcast="true" message="Get to section 5C and erradicate the aggressors!">
     248        <events>
     249            <trigger>
     250                <EventTrigger stayactive="true" delay=8 >
     251                   <events>
     252                      <trigger>
     253                         <EventListener event="spawntrigger" />
     254                      </trigger>
     255                   </events>
     256                </EventTrigger>
     257            </trigger>
     258        </events>
     259    </SimpleNotification>
     260
     261    <SimpleNotification broadcast="true" message="That seems extreme. Is there no way around it?">
     262        <events>
     263            <trigger>
     264                <EventTrigger stayactive="true" delay=12 >
     265                   <events>
     266                      <trigger>
     267                         <EventListener event="spawntrigger" />
     268                      </trigger>
     269                   </events>
     270                </EventTrigger>
     271            </trigger>
     272        </events>
     273    </SimpleNotification>
     274
     275     <SimpleNotification broadcast="true" message="Stick to your objective, Commander. This is war.">
     276        <events>
     277            <trigger>
     278                <EventTrigger stayactive="true" delay=16 >
     279                   <events>
     280                      <trigger>
     281                         <EventListener event="spawntrigger" />
     282                      </trigger>
     283                   </events>
     284                </EventTrigger>
     285            </trigger>
     286        </events>
     287    </SimpleNotification>
     288
     289    <!--SHIPS -->
     290
     291    <!--Allied units-->
     292
     293   
     294
     295    <SpaceShip position="<?lua printC(cAlly1) ?>" lookat="0,0,0" name="leader1">
     296      <templates>
     297        <Template link=spaceshipassff />
     298      </templates>
     299      <controller>
     300        <DivisionController team=0 formationMode="DIAMOND" action="FIGHT">
     301        </DivisionController>
     302      </controller>
     303    </SpaceShip>
     304
     305    <SpaceShip position="100 ,0,100" lookat="0,0,0">
     306      <templates>
     307        <Template link=spaceshipassff />
     308      </templates>
     309      <controller>
     310        <WingmanController team=0>
     311        </WingmanController>
     312      </controller>
     313    </SpaceShip>
     314
     315    <SpaceShip position="0, -100,0" lookat="0,0,0">
     316      <templates>
     317        <Template link=spaceshipassff />
     318      </templates>
     319      <controller>
     320        <WingmanController team=0>
     321        </WingmanController>
     322      </controller>
     323    </SpaceShip>
     324
     325    <SpaceShip position="-100, 0, 100" lookat="0,0,0">
     326      <templates>
     327        <Template link=spaceshipassff />
     328      </templates>
     329      <controller>
     330        <SectionController team=0>
     331        </SectionController>
     332      </controller>
     333    </SpaceShip>
     334
     335   
     336   
     337    <!-- Enemy Units -->
     338
     339
     340    <?lua
     341    for k = 1, units, 1
     342    do
     343    x = math.cos(math.pi/(2*units - 2)*k)*1500
     344    y = math.sin(math.pi/(2*units - 2)*k)*1500
     345    ?>
     346
     347    <SpaceShip team=1 position="<?lua printC(cEnemy1) ?>" lookat="0,0,0" name="enemy<?lua print(k) ?>">
     348      <templates>
     349        <Template link=spaceshipassff />
     350      </templates>
     351      <controller>
     352        <DivisionController team=1 formationMode="DIAMOND" action="FIGHT">
     353        </DivisionController>
     354      </controller>
     355    </SpaceShip>
     356
     357    <SpaceShip team=1 position="100 ,0,100" lookat="0,0,0" name="enemy<?lua print(k) ?>">
     358      <templates>
     359        <Template link=spaceshipassff />
     360      </templates>
     361      <controller>
     362        <WingmanController team=1>
     363        </WingmanController>
     364      </controller>
     365    </SpaceShip>
     366
     367    <SpaceShip team=1 position="0, -100,0" lookat="0,0,0" name="enemy<?lua print(k) ?>">
     368      <templates>
     369        <Template link=spaceshipassff />
     370      </templates>
     371      <controller>
     372        <WingmanController team=1>
     373        </WingmanController>
     374      </controller>
     375    </SpaceShip>
     376
     377    <SpaceShip team=1 position="-100, 0, 100" lookat="0,0,0" name="enemy<?lua print(k) ?>">
     378      <templates>
     379        <Template link=spaceshipassff />
     380      </templates>
     381      <controller>
     382        <SectionController team=1>
     383        </SectionController>
     384      </controller>
     385    </SpaceShip>
     386
     387    <?lua end ?>
     388   
    160389    <!--ELEMENTS -->
    161390
    162     <!-- Planets from the shuttle defense Level. Remove or keep at will. -->
    163 
    164     <Planet
     391    <!-- Asteroids you have to fly through to get to the EnemyBase -->
     392   
     393    <?lua
     394        dofile("includes/asteroidField.lua")
     395       asteroidField(cField1[1], cField1[2], cField1[3], 20, 30, 4500, 500, 0)
     396    ?>   
     397
     398    <!-- Other Asteroid-Fields -->
     399
     400    <?lua
     401        dofile("includes/asteroidField.lua")
     402       asteroidField(cField2[1], cField2[2], cField2[3], 20, 30, 4500, 500, 0)
     403    ?>
     404
     405    <!-- Planets -->
     406
     407   <Planet
    165408        position="<?lua printC(cPlanet1) ?>"
    166         scale="2000"
     409        scale="3000"
    167410        collisionType="dynamic"
    168411        linearDamping="0.8"
     
    178421        collisiondamage = 2
    179422        enablecollisiondamage = true
     423    visible=true
     424    active=true
     425      >
     426      <attached>
     427        <ForceField position="0,0,0" mode="sphere" diameter="6000" velocity="-500" />
     428        </attached>
     429          <collisionShapes>
     430            <SphereCollisionShape radius="3000" position="0,0,0" />
     431      </collisionShapes>
     432    </Planet>
     433
     434    <?lua
     435        dofile("includes/asteroidField.lua")
     436        asteroidBelt(cPlanet1[1], cPlanet1[2], cPlanet1[3], 30, 20, 100, 20, 40, 3400, 3700, 400, 1)
     437    ?>
     438
     439    <Planet
     440        position="<?lua printC(cPlanet2) ?>"
     441        scale="2000"
     442        collisionType="dynamic"
     443        linearDamping="0.8"
     444        angularDamping="0"
     445        mass="5000000"
     446        pitch="0"
     447        mesh="planets/ganymede.mesh"
     448        atmosphere="atmosphere1"
     449        rotationaxis="1,0,0"
     450        rotationrate="1.0"
     451        atmospheresize="80.0f"
     452        imagesize="1024.0f"
     453        collisiondamage = 2
     454        enablecollisiondamage = true
     455    visible=true
     456    active=true
    180457      >
    181458      <attached>
     
    189466    <?lua
    190467        dofile("includes/asteroidField.lua")
    191         asteroidBelt(cPlanet1[1], cPlanet1[2], cPlanet1[3], 30, 0, 30, 20, 40, 2800, 3000, 200, 1)
     468        asteroidBelt(cPlanet2[1], cPlanet2[2], cPlanet2[3], 30, 20, 100, 20, 40, 3400, 3700, 400, 1)
    192469    ?>
    193470
     471    <!-- EnemyPlanet(s) -->
     472
    194473    <Planet
    195         position="<?lua printC(cPlanet2) ?>"
    196         scale="3000"
     474        position="<?lua printC(cEnemyBasePlanet) ?>"
     475        scale="5000"
    197476        collisionType="dynamic"
    198477        linearDamping="0.8"
     
    200479        mass="5000000"
    201480        pitch="0"
    202         mesh="planets/planet3.mesh"
     481        mesh="planets/jupiter.mesh"
    203482        atmosphere="atmosphere1"
    204483        rotationaxis="1,0,0"
     
    208487        collisiondamage = 2
    209488        enablecollisiondamage = true
     489    visible=true
     490    active=true
    210491      >
    211492      <attached>
    212         <ForceField position="0,0,0" mode="sphere" diameter="6000" velocity="-500" />
     493        <ForceField position="0,0,0" mode="sphere" diameter="10000" velocity="-500" />
    213494        </attached>
    214495          <collisionShapes>
    215             <SphereCollisionShape radius="3000" position="0,0,0" />
     496            <SphereCollisionShape radius="5000" position="0,0,0" />
    216497      </collisionShapes>
    217498    </Planet>
    218499
    219     <?lua
    220         dofile("includes/asteroidField.lua")
    221         asteroidBelt(cPlanet2[1], cPlanet2[2], cPlanet2[3], 30, 20, 100, 20, 40, 3400, 3700, 400, 1)
    222     ?>
    223 
    224500    </Scene>
    225501</Level>
Note: See TracChangeset for help on using the changeset viewer.