Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10683


Ignore:
Timestamp:
Oct 24, 2015, 6:15:03 PM (9 years ago)
Author:
paulsc
Message:

Added Station C, started work on events.

File:
1 edited

Legend:

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

    r10680 r10683  
    2525        <Template link="lodtemplate_default" />
    2626    </templates>
     27
    2728    <?lua include("includes/notifications.oxi") ?>
    2829
     
    3233    >
    3334
     35    <SpawnPoint name="PlayerSpawn" team=1 position="0,-50,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff2 />
     36
    3437    <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" />
    3538
     
    4346            <QuestHint id="quest1hint1" />
    4447        </hints>
    45         <subquests>
    46         </subquests>
    47     </GlobalQuest>
    48 
    49     <GlobalQuest id="quest2">
    50         <QuestDescription title="Prepare to fight the Wave" description="" failMessage="" completeMessage="" />
    51         <hints>
    52         </hints>
    53         <subquests>
    54             <GlobalQuest id="quest2.1">
    55                 <QuestDescription title="Get a better Spaceship" description="" failMessage="" completeMessage="" />
    56             </GlobalQuest>
    57             <GlobalQuest id="quest2.2">
    58                 <QuestDescription title="Get some Pickups" description="" failMessage="" completeMessage="" />
    59             </GlobalQuest>
    60             <GlobalQuest id="quest2.3">
    61                 <QuestDescription title="Meet your Unit" description="" failMessage="" completeMessage="" />
    62             </GlobalQuest>
    63         </subquests>
    64     </GlobalQuest>
    65 
    66     <GlobalQuest id="quest3">
    67         <QuestDescription title="Fight the first Wave" description="" failMessage="" completeMessage="" />
    68         <hints>
    69         </hints>
    70         <subquests>
    71         </subquests>
    72     </GlobalQuest>
    73 
    74     <GlobalQuest id="quest4">
    75         <QuestDescription title="Prepare for the next Wave" description="" failMessage="" completeMessage="" />
    76         <hints>
    77         </hints>
    78         <subquests>
    79             <GlobalQuest id="quest4.1">
    80                 <QuestDescription title="Get to the Defense Station" description="" failMessage="" completeMessage="" />
    81             </GlobalQuest>
    82             <GlobalQuest id="quest4.2">
    83                 <QuestDescription title="Find the turret" description="" failMessage="" completeMessage="" />
    84             </GlobalQuest>
    85         </subquests>
    86     </GlobalQuest>
    87 
    88     <GlobalQuest id="quest5">
    89         <QuestDescription title="Fight the Hord!" description="" failMessage="" completeMessage="" />
    90         <hints>
    91         </hints>
    92         <subquests>
    93         </subquests>
    94     </GlobalQuest>
    95 
    96     <GlobalQuest id="quest6">
    97         <QuestDescription title="Get back to the Transporter" description="" failMessage="" completeMessage="" />
    98         <hints>
    99         </hints>
    100         <subquests>
    101             <GlobalQuest id="quest6.1">
    102                 <QuestDescription title="Collect the local Pickups" description="" failMessage="" completeMessage="" />
    103             </GlobalQuest>
    104             <GlobalQuest id="quest6.2">
    105                 <QuestDescription title="Use Portal to the Transporter" description="" failMessage="" completeMessage="" />
    106             </GlobalQuest>
    107         </subquests>
    108     </GlobalQuest>
    109 
    110     <GlobalQuest id="quest7">
    111         <QuestDescription title="Fight the final Wave" description="" failMessage="" completeMessage="" />
    112         <hints>
    113         </hints>
    114         <subquests>
    115         </subquests>
    116     </GlobalQuest>
    117 
    118     <!--EVENTS-->
    119 
    120     <EventMultiTrigger name=spawntrigger>
    121         <events>
    122             <trigger>
    123                 <SpawnPoint team=1 position="0,-50,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff2 />
    124             </trigger>
    125         </events>
    126     </EventMultiTrigger>
    127 
    128     <QuestEffectBeacon times=1>
    129         <effects>
    130             <AddQuest questId="quest1" />
     48        <complete-effects>
    13149            <AddQuest questId="quest2" />
    13250            <AddQuest questId="quest2.1" />
    13351            <AddQuest questId="quest2.2" />
    13452            <AddQuest questId="quest2.3" />
     53        </complete-effects>
     54    </GlobalQuest>
     55
     56    <GlobalQuest id="quest2">
     57        <QuestDescription title="Prepare to fight the Wave" description="" failMessage="" completeMessage="" />
     58        <hints>
     59        </hints>
     60        <subquests>
     61            <GlobalQuest id="quest2.1">
     62                <QuestDescription title="Get a better Spaceship" description="" failMessage="" completeMessage="" />
     63            </GlobalQuest>
     64            <GlobalQuest id="quest2.2">
     65                <QuestDescription title="Get some Pickups" description="" failMessage="" completeMessage="" />
     66            </GlobalQuest>
     67            <GlobalQuest id="quest2.3">
     68                <QuestDescription title="Meet your Unit" description="" failMessage="" completeMessage="" />
     69            </GlobalQuest>
     70        </subquests>
     71        <complete-effects>
    13572            <AddQuest questId="quest3" />
     73        </complete-effects>
     74    </GlobalQuest>
     75
     76    <GlobalQuest id="quest3">
     77        <QuestDescription title="Fight the first Wave" description="" failMessage="" completeMessage="" />
     78        <hints>
     79        </hints>
     80        <complete-effects>
    13681            <AddQuest questId="quest4" />
    13782            <AddQuest questId="quest4.1" />
    13883            <AddQuest questId="quest4.2" />
     84        </complete-effects>
     85    </GlobalQuest>
     86
     87    <GlobalQuest id="quest4">
     88        <QuestDescription title="Prepare for the next Wave" description="" failMessage="" completeMessage="" />
     89        <hints>
     90        </hints>
     91        <subquests>
     92            <GlobalQuest id="quest4.1">
     93                <QuestDescription title="Get to the Defense Station" description="" failMessage="" completeMessage="" />
     94            </GlobalQuest>
     95            <GlobalQuest id="quest4.2">
     96                <QuestDescription title="Find the turret" description="" failMessage="" completeMessage="" />
     97            </GlobalQuest>
     98        </subquests>
     99        <complete-effects>
    139100            <AddQuest questId="quest5" />
     101        </complete-effects>
     102    </GlobalQuest>
     103
     104    <GlobalQuest id="quest5">
     105        <QuestDescription title="Fight the Hord!" description="" failMessage="" completeMessage="" />
     106        <hints>
     107        </hints>
     108        <complete-effects>
    140109            <AddQuest questId="quest6" />
    141110            <AddQuest questId="quest6.1" />
    142111            <AddQuest questId="quest6.2" />
     112        </complete-effects>
     113    </GlobalQuest>
     114
     115    <GlobalQuest id="quest6">
     116        <QuestDescription title="Get back to the Transporter" description="" failMessage="" completeMessage="" />
     117        <hints>
     118        </hints>
     119        <subquests>
     120            <GlobalQuest id="quest6.1">
     121                <QuestDescription title="Collect the local Pickups" description="" failMessage="" completeMessage="" />
     122            </GlobalQuest>
     123            <GlobalQuest id="quest6.2">
     124                <QuestDescription title="Use Portal to the Transporter" description="" failMessage="" completeMessage="" />
     125            </GlobalQuest>
     126        </subquests>
     127        <complete-effects>
    143128            <AddQuest questId="quest7" />
     129        </complete-effects>
     130    </GlobalQuest>
     131
     132    <GlobalQuest id="quest7">
     133        <QuestDescription title="Fight the final Wave" description="" failMessage="" completeMessage="" />
     134        <hints>
     135        </hints>
     136        <subquests>
     137        </subquests>
     138    </GlobalQuest>
     139
     140    <!--EVENTS AND TRIGGERS
     141        Usable events and triggers:
     142        _spawntrigger
     143        _reachedA
     144        _wave<1|2|3>
     145    -->
     146
     147    <EventMultiTrigger name="spawntrigger">
     148        <events>
     149            <trigger>
     150                <EventListener event="PlayerSpawn" />
     151            </trigger>
     152        </events>
     153    </EventMultiTrigger>
     154
     155    <QuestEffectBeacon times=1>
     156        <effects>
     157            <AddQuest questId="quest1" />
    144158        </effects>
    145159        <events>
    146160            <execute>
    147                 <EventListener event=spawntrigger />
     161                <EventListener event="spawntrigger" />
    148162            </execute>
    149163        </events>
    150164    </QuestEffectBeacon>
    151165
     166    <DistanceTrigger name="reachedA" position="2494,-1667,0" distance=200 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true />
     167
     168    <EventMultiTrigger name="wave1">
     169        <events>
     170            <trigger>
     171                <EventListener event="reachedA" />
     172            </trigger>
     173        </events>
     174    </EventMultiTrigger>
     175
    152176    <!--STRUCTURE -->
    153177
    154178    <!-- A, Coordinates are approx. (cos(29pi/16), sin(29pi/16), 0)*3000 -->
    155     <StaticEntity position="2494,-1667,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 >
     179    <StaticEntity name="statA" position="2494,-1667,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01>
    156180        <attached>
    157181            <Model position="0,0,0" mesh="cube.mesh" scale3D="40,40,40" />
     
    163187
    164188    <!-- B, Coordinates are approx. (-cos(29pi/16), sin(29pi/16), 0)*3000 -->
    165     <StaticEntity position="-2494,-1667,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 >
     189    <StaticEntity name="statB" position="-2494,-1667,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01>
    166190        <attached>
    167191            <Model position="0,0,0" mesh="cube.mesh" scale3D="40,40,40" />
     
    172196    </StaticEntity>
    173197
     198    <!-- C -->
     199    <StaticEntity name="statC" position="0,-1400,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01>
     200        <attached>
     201            <Model position="0,0,0" mesh="cube.mesh" scale3D="40,40,40" />
     202        </attached>
     203        <collisionShapes>
     204            <BoxCollisionShape position="0,0,0" halfExtents="10,10,10" />
     205        </collisionShapes>
     206    </StaticEntity>
     207
    174208    <!--ELEMENTS -->
    175209
    176     <!-- Enemies -->
     210    <!-- Enemies. Outer loop defines waves, inner loop defines enemies in every wave. -->
    177211    <?lua
    178     max = 5
    179     for i = 1, max, 1
     212    waves = 5
     213    for k = 1, waves, 1
     214    do
     215    ?>
     216    <?lua
     217    enemies = 5
     218    for i = 1, enemies, 1
    180219    do
    181220    x = math.cos(math.pi/8*(i+1))*1500
    182221    y = math.sin(math.pi/8*(i+1))*1500
    183222    ?>
    184     <SpaceShip position="<?lua print(x)?>,<?lua print(y)?>,<?lua print(math.pow(-1,i)*250) ?>" lookat="0,0,0" team=2>
     223    <SpaceShip visible=false active=false name="attackers<?lua print(k)?>" radarname="Attacker" position="<?lua print(x)?>,<?lua print(y)?>,<?lua print(math.pow(-1,i)*250) ?>" lookat="0,0,0" team=2>
    185224        <templates>
    186225            <Template link="spaceshippirate" />
    187226        </templates>
     227        <events>
     228            <visibility>
     229                <EventListener event="wave<?lua print(k)?>" />
     230            </visibility>
     231            <activity>
     232                <EventListener event="wave<?lua print(k)?>" />
     233            </activity>
     234        </events>
     235        <attached>
     236            <DistanceTriggerBeacon name="NPC" />
     237        </attached>
    188238        <controller>
    189             <WaypointPatrolController alertnessradius=50 team=1>
     239            <WaypointPatrolController name="attackController" alertnessradius=50 team=1 active=false>
    190240                <waypoints>
    191241                    <Attacher target="transporter" deletewithparent=false />
    192242                </waypoints>
     243                <events>
     244                    <activity>
     245                        <EventListener event="wave<?lua print(k)?>" />
     246                    </activity>
     247                </events>
    193248            </WaypointPatrolController>
    194249        </controller>
    195250    </SpaceShip>
    196251    <?lua end ?>
     252    <?lua end ?>
    197253
    198254    <!-- Transporter, starting Point is near A, end Point near B, the circle parameters for the waypoints are: Center = (0, -887, 0), r = 2613 -->
    199     <SpaceShip position="2450, -1667, 0" lookat="-2494, -1667, 0" team=1 name="transporter">
     255    <SpaceShip position="2450, -1667, 0" lookat="-2494, -1667, 0" team=1 name="transporter" radarname="Shuttle">
    200256        <templates>
    201257            <Template link="spaceshipTransporter" />
    202258        </templates>
     259        <attached>
     260            <DistanceTriggerBeacon name="NPC" />
     261        </attached>
    203262        <controller>
    204263            <WaypointController accuracy=10>
Note: See TracChangeset for help on using the changeset viewer.