Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10921


Ignore:
Timestamp:
Dec 6, 2015, 4:06:00 PM (9 years ago)
Author:
paulsc
Message:

Finished (events in) expedition level.

File:
1 edited

Legend:

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

    r10914 r10921  
    5252        radSector = 12000
    5353
    54               cStationA = {1400, 400, -800}
     54            cStationA = {1400, 400, -800}
    5555        cNewShip = {1000, 250, -350}
    5656
     
    9191
    9292    <GlobalQuest id="quest1">
    93         <QuestDescription title="Quest 1" description="We received some extraterrestial binary radio signals from Sector 5C! We'd like yout to take the portal and fly over there to check out if life can be found there as we believed to be an inhabitated region in space." failMessage="" completeMessage="" />
     93        <QuestDescription title="Get the scout ship" description="We received some extraterrestial binary radio signals from Sector 5C! We'd like you to get to the outer base in sector 4A and get a scout ship to explore the sector!" failMessage="" completeMessage="" />
    9494        <hints>
    9595        </hints>
     
    9999    </GlobalQuest>
    100100
     101    <GlobalQuest id="quest2">
     102        <QuestDescription title="Explore the sector" description="Now then, Commander, fly over there to check out if life can be found in what we believed it to be an inhabitated region in space. We have marked 5B with red lights so you can easily find it." failMessage="" completeMessage="" />
     103        <hints>
     104        </hints>
     105        <subquests>
     106            <GlobalQuest id="quest2.1">
     107                <QuestDescription title="> Get to the Field Source" description="We percieve a large magnetic field source at a certain spot in the sector. You should check it out! We have marked it with a blue light." failMessage="" completeMessage="" />
     108                <hints>
     109                </hints>
     110                <complete-effects>
     111                    <AddQuest questId="quest2.2" />
     112                </complete-effects>
     113            </GlobalQuest>
     114            <GlobalQuest id="quest2.2">
     115                <QuestDescription title="> Fight your way out" description="Oh no... this cannot be happening! We discovered an alien race, and it does not seem to be interested in peace. In fact, they seem to be planning an attack! You must get out of the hot zone. Fight if necessary!" failMessage="" completeMessage="" />
     116                <hints>
     117                </hints>
     118                <complete-effects>
     119                    <AddQuest questId="quest3" />
     120                </complete-effects>
     121            </GlobalQuest>
     122        </subquests>
     123    </GlobalQuest>
     124
     125    <GlobalQuest id="quest3">
     126        <QuestDescription title="Get back to 4A" description="You made it out in one piece. Now report to base 4A to warn the others!" failMessage="" completeMessage="" />
     127        <hints>
     128        </hints>
     129    </GlobalQuest>
     130
    101131    <!--EVENTS AND TRIGGERS
    102132        Usable events and triggers:
    103133        spawntrigger
     134        dockA
     135        reachedSector
     136        reachedEnemyStation
     137        fightEnd
     138        backToA
    104139
    105140        BASE-STORY-LINE:
     
    134169    </EventMultiTrigger>
    135170
    136     <!--TODO: Complete the DistanceTriggers for completing/succeeding correctly! -->
    137 
    138     <DistanceTrigger active=false name="missionComplete" position="2000,0,0" distance=100 target="SpaceShip" stayactive=true>
     171    <!-- HACK: just waited out 3sec for animation. Cannot link an event to the COMPLETION of a dock. How is this not possible?? -->
     172    <EventMultiTrigger name="dockedA" activations="1" stayactive="true" delay=3>
     173        <events>
     174            <trigger>
     175                <EventListener event="dockA" />
     176            </trigger>
     177        </events>
     178    </EventMultiTrigger>
     179
     180    <DistanceTrigger name="reachedSector" position="<?lua printC(cSector) ?>" distance="<?lua print(radSector) ?>" target="SpaceShip" beaconMode="identify" targetname="newSpaceShip" stayactive=true />
     181
     182    <DistanceTrigger name="reachedEnemyStation" position="<?lua printC(cEnemyBaseStation1) ?>" distance="5000" target="SpaceShip" beaconMode="identify" targetname="newSpaceShip" stayactive=true />
     183
     184    <!-- Recursive helper function for the fightEnd event -->
     185    <?lua
     186    function enemyTriggerRecursor(i)
     187    if i > 0 then
     188    return [[
     189    <EventTrigger name=killedEnemy]] .. i .. [[ activations=1 stayactive=true delay=0.1>
     190        <events>
     191            <trigger>
     192                <EventListener event=enemy />
     193            </trigger>
     194        </events>
     195        ]] .. enemyTriggerRecursor(i-1) .. [[
     196    </EventTrigger>
     197    ]]
     198    else return ""
     199    end
     200    end
     201    ?>
     202    <!-- Actual Event for the enemies. -->
     203    <?lua print(enemyTriggerRecursor(5)) ?>
     204    <EventMultiTrigger name="fightEnd" delay=0.1 stayactive=true>
     205        <events>
     206            <trigger>
     207                <EventListener event="killedEnemy5" />
     208            </trigger>
     209        </events>
     210    </EventMultiTrigger>
     211
     212    <DistanceTrigger active=false name="closeToPatrol" position="<?lua printC(cStationA) ?>" distance="6000" target="SpaceShip" beaconMode="identify" targetname="newSpaceShip" stayactive=true >
    139213        <events>
    140214            <activity>
    141                 <EventListener event="missionCompletePrereq" />
     215                <EventListener event="reachedEnemyStation" />
    142216            </activity>
    143217        </events>
    144218    </DistanceTrigger>
    145219
     220    <DistanceTrigger active=false name="backToA" position="<?lua printC(cStationA) ?>" distance="600" target="SpaceShip" beaconMode="identify" targetname="newSpaceShip" stayactive=true >
     221        <events>
     222            <activity>
     223                <EventListener event="fightEnd" />
     224            </activity>
     225        </events>
     226    </DistanceTrigger>
     227
    146228    <Script code="Mission endMission true" onLoad="false">
    147229        <events>
    148230            <trigger>
    149                 <EventListener event="missionComplete" />
     231                <EventListener event="backToA" />
    150232            </trigger>
    151233        </events>
    152234    </Script>
    153235
    154     <DistanceTrigger active=false name="missionFailed" position="2000,0,0" distance=100 target="SpaceShip" stayactive=true>
     236    <DistanceTrigger invert=true active=false name="hasDied" position="<?lua printC(cSector) ?>" distance="100000" target="SpaceShip" beaconMode="identify" targetname="newSpaceShip" stayactive=true >
    155237        <events>
    156238            <activity>
    157                 <EventListener event="missionFailedPrereq" />
     239                <EventListener event="reachedSector" />
    158240            </activity>
    159241        </events>
     
    163245        <events>
    164246            <trigger>
    165                 <EventListener event="failMission" />
     247                <EventListener event="hasDied" />
    166248            </trigger>
    167249        </events>
     
    181263    </QuestEffectBeacon>
    182264
     265    <QuestEffectBeacon times=1>
     266        <effects>
     267            <CompleteQuest questId="quest1" />
     268        </effects>
     269        <events>
     270            <execute>
     271                <EventListener event="dockedA" />
     272            </execute>
     273        </events>
     274    </QuestEffectBeacon>
     275
     276    <QuestEffectBeacon times=1>
     277        <effects>
     278            <AddQuest questId="quest2.1" />
     279        </effects>
     280        <events>
     281            <execute>
     282                <EventListener event="reachedSector" />
     283            </execute>
     284        </events>
     285    </QuestEffectBeacon>
     286
     287    <QuestEffectBeacon times=1>
     288        <effects>
     289            <CompleteQuest questId="quest2.1" />
     290            <AddQuest questId="quest2.2" />
     291        </effects>
     292        <events>
     293            <execute>
     294                <EventListener event="reachedEnemyStation" />
     295            </execute>
     296        </events>
     297    </QuestEffectBeacon>
     298
     299    <QuestEffectBeacon times=1>
     300        <effects>
     301            <CompleteQuest questId="quest2.2" />
     302            <CompleteQuest questId="quest2" />
     303        </effects>
     304        <events>
     305            <execute>
     306                <EventListener event="fightEnd" />
     307            </execute>
     308        </events>
     309    </QuestEffectBeacon>
     310
    183311    <!--NOTIFICATIONS -->
    184312
     
    197325    </SimpleNotification>
    198326
    199     <SimpleNotification broadcast="true" message="Please check your quests!">
    200         <events>
    201             <trigger>
    202                 <EventTrigger stayactive="true" delay=7 >
     327    <SimpleNotification broadcast="true" message="We've picked up strange radio Signals from Sector 5B!">
     328        <events>
     329            <trigger>
     330                <EventTrigger stayactive="true" delay=8 >
    203331                   <events>
    204332                      <trigger>
    205333                         <EventListener event="spawntrigger" />
     334                      </trigger>
     335                   </events>
     336                </EventTrigger>
     337            </trigger>
     338        </events>
     339    </SimpleNotification>
     340
     341    <SimpleNotification broadcast="true" message="Please dock to the outer base and get into the scout ship!">
     342        <events>
     343            <trigger>
     344                <EventTrigger stayactive="true" delay=12 >
     345                   <events>
     346                      <trigger>
     347                         <EventListener event="spawntrigger" />
     348                      </trigger>
     349                   </events>
     350                </EventTrigger>
     351            </trigger>
     352        </events>
     353    </SimpleNotification>
     354
     355    <SimpleNotification broadcast="true" message="We have marked the sector in red Lights. Enter it!">
     356        <events>
     357            <trigger>
     358                <EventTrigger stayactive="true" delay=0 >
     359                   <events>
     360                      <trigger>
     361                         <EventListener event="dockedA" />
     362                      </trigger>
     363                   </events>
     364                </EventTrigger>
     365            </trigger>
     366        </events>
     367    </SimpleNotification>
     368
     369    <SimpleNotification broadcast="true" message="Huh? Something's emanating a strong field... We marked it in blue.">
     370        <events>
     371            <trigger>
     372                <EventTrigger stayactive="true" delay=0 >
     373                   <events>
     374                      <trigger>
     375                         <EventListener event="reachedSector" />
     376                      </trigger>
     377                   </events>
     378                </EventTrigger>
     379            </trigger>
     380        </events>
     381    </SimpleNotification>
     382
     383    <SimpleNotification broadcast="true" message="Woah! What the hell? We made alien contact!">
     384        <events>
     385            <trigger>
     386                <EventTrigger stayactive="true" delay=0 >
     387                   <events>
     388                      <trigger>
     389                         <EventListener event="reachedEnemyStation" />
     390                      </trigger>
     391                   </events>
     392                </EventTrigger>
     393            </trigger>
     394        </events>
     395    </SimpleNotification>
     396
     397    <SimpleNotification broadcast="true" message="It looks like they are getting ready to attack someone...">
     398        <events>
     399            <trigger>
     400                <EventTrigger stayactive="true" delay=4 >
     401                   <events>
     402                      <trigger>
     403                         <EventListener event="reachedEnemyStation" />
     404                      </trigger>
     405                   </events>
     406                </EventTrigger>
     407            </trigger>
     408        </events>
     409    </SimpleNotification>
     410
     411    <SimpleNotification broadcast="true" message="It must be us! Commander, get back to the base and report!">
     412        <events>
     413            <trigger>
     414                <EventTrigger stayactive="true" delay=8 >
     415                   <events>
     416                      <trigger>
     417                         <EventListener event="reachedEnemyStation" />
     418                      </trigger>
     419                   </events>
     420                </EventTrigger>
     421            </trigger>
     422        </events>
     423    </SimpleNotification>
     424
     425    <SimpleNotification broadcast="true" message="Oh no! A patrol! When did it get here?!">
     426        <events>
     427            <trigger>
     428                <EventTrigger stayactive="true" delay=0 >
     429                   <events>
     430                      <trigger>
     431                         <EventListener event="closeToPatrol" />
     432                      </trigger>
     433                   </events>
     434                </EventTrigger>
     435            </trigger>
     436        </events>
     437    </SimpleNotification>
     438
     439    <SimpleNotification broadcast="true" message="Phew, that was close. Now get back here!">
     440        <events>
     441            <trigger>
     442                <EventTrigger stayactive="true" delay=0 >
     443                   <events>
     444                      <trigger>
     445                         <EventListener event="fightEnd" />
    206446                      </trigger>
    207447                   </events>
     
    244484            <Template link="station" />
    245485        </templates>
    246         <attached>
     486        <attached>
    247487            <DockingTarget name="dockTargetA" />
    248488            <Dock position="0,0,0" active=true>
     
    258498                    </execute>
    259499                </events>
    260             </Dock>
    261         </attached>
     500                <attached>
     501                    <DistanceTrigger position="0,0,0" distance="200" target="SpaceShip" beaconMode="exclude" targetname="NPC" name="dockA" />
     502                    <Billboard position="0,0,0" amplitude=1 material="Flares/lensflare" colour="1,0,0.05" />
     503                </attached>
     504            </Dock>
     505        </attached>
    262506    </Pawn>
    263507
    264508    <!-- EnemyStation -->
     509
     510    <!-- Marking Billboard -->
     511    <Billboard visible=false position="<?lua printC(cEnemyBaseStation1) ?>" amplitude=30 scale=2 material="Flares/lensflare" colour="0,0,1">
     512        <events>
     513           <visibility>
     514              <EventListener event="reachedSector" />
     515          </visibility>
     516        </events>
     517    </Billboard>
     518
    265519
    266520    <Pawn name="statB" team=1 radarname="EnemyBase" position="<?lua printC(cEnemyBaseStation1) ?>" direction="<?lua printC(cSpawn) ?>" yaw=45 pitch=-5 roll=-25 initialhealth=10000 maxhealth=10000 >
     
    268522            <Template link="station" />
    269523        </templates>
     524        <events>
     525            <visibility>
     526                <EventListener event="reachedEnemyStation" />
     527            </visibility>
     528            <activity>
     529                <EventListener event="reachedEnemyStation" />
     530            </activity>
     531        </events>
    270532    </Pawn>
    271533
     
    275537            team                = "0"
    276538            position            = "<?lua printC(cNewShip) ?>"
    277             lookat              = "0, 0, 0"
    278             health              = "400"
    279             initialhealth       = "400"
     539            lookat              = "<?lua printC(cSector) ?>"
     540            health              = "1500"
     541            initialhealth       = "1500"
    280542            maxhealth           = "1500"
    281543            shieldhealth        = "80"
     
    301563    cBillNow = addC(cSector,rBillboard)
    302564    ?>
    303     <Billboard position="<?lua printC(cBillNow) ?>"  scale=10 material="Flares/lensflare" colour="1,0.2,0.2"/>
     565    <Billboard position="<?lua printC(cBillNow) ?>"  scale=10 material="Flares/lensflare" colour="1,0.2,0.2" visible=false>
     566        <events>
     567            <visibility>
     568                <EventListener event="dockedA" />
     569            </visibility>
     570        </events>
     571    </Billboard>
    304572    <?lua end ?>
    305573
     
    337605        enablecollisiondamage=true
    338606              visible=true
    339               active=true
     607              active=ture
    340608      >
    341609      <attached>
     
    402670        collisiondamage=2
    403671        enablecollisiondamage=true
    404               visible=true
    405               active=true
     672              visible=false
     673              active=false
    406674      >
    407675      <attached>
     
    425693      z = -4400+j*100
    426694    ?>
    427     <SpaceShip visible=true active=false name="Enemies" radarname="Attacker" position="-11000,<?lua print(z)?>,<?lua print(x)?>" lookat="0,0,0" team=1>
     695    <SpaceShip visible=false active=false name="enemyStalled" radarname="Attacker" position="-11000,<?lua print(z)?>,<?lua print(x)?>" lookat="0,0,0" team=1>
    428696        <templates>
    429697            <Template link="spaceshippirate" />
    430698        </templates>
     699        <events>
     700            <visibility>
     701                <EventListener event="reachedEnemyStation" />
     702            </visibility>
     703        </events>
    431704    </SpaceShip>
    432705    <?lua end ?>
    433706    <?lua end ?>
    434707
    435     <SpaceShip visible=true active=true name="Enemies" radarname="Attacker" position="-2700,-800,-800" lookat="0,0,0" team=1>
     708    <SpaceShip visible=false active=false name="enemy" radarname="Guard" position="-2700,-800,-800" lookat="0,0,0" team=1>
    436709      <templates>
    437710        <Template link=spaceshippirate />
    438711      </templates>
     712      <events>
     713          <visibility>
     714              <EventListener event="reachedEnemyStation" />
     715          </visibility>
     716          <activity>
     717              <EventListener event="reachedEnemyStation" />
     718          </activity>
     719      </events>
    439720      <controller>
    440         <WaypointPatrolController accuracy=40 alertnessradius=100 team=1>
     721        <WaypointPatrolController active=false accuracy=40 alertnessradius=2000 team=1>
     722            <events>
     723                <activity>
     724                    <EventListener event="reachedEnemyStation" />
     725                </activity>
     726            </events>
    441727          <waypoints>
    442728            <StaticEntity position="-3400,-1200,-200" />
     
    450736    </SpaceShip>
    451737
    452     <SpaceShip visible=true active=true name="Enemies" radarname="Attacker" position="-3400,-1200,-200" lookat="0,0,0" team=1>
     738    <SpaceShip visible=false active=false name="enemy" radarname="Guard" position="-3400,-1200,-200" lookat="0,0,0" team=1>
     739        <events>
     740            <visibility>
     741                <EventListener event="reachedEnemyStation" />
     742            </visibility>
     743            <activity>
     744                <EventListener event="reachedEnemyStation" />
     745            </activity>
     746        </events>
    453747      <templates>
    454748        <Template link=spaceshippirate />
    455749      </templates>
    456750      <controller>
    457         <WaypointPatrolController accuracy=40 alertnessradius=100 team=1>
     751        <WaypointPatrolController active=false accuracy=40 alertnessradius=2000 team=1>
     752            <events>
     753                <activity>
     754                    <EventListener event="reachedEnemyStation" />
     755                </activity>
     756            </events>
    458757          <waypoints>
    459758            <StaticEntity position="-1600,-1000,-200" />
     
    467766    </SpaceShip>
    468767
    469     <SpaceShip visible=true active=true name="Enemies" radarname="Attacker" position="-1600,-1000,-200" lookat="0,0,0" team=1>
     768    <SpaceShip visible=false active=false name="enemy" radarname="Guard" position="-1600,-1000,-200" lookat="0,0,0" team=1>
     769        <events>
     770            <visibility>
     771                <EventListener event="reachedEnemyStation" />
     772            </visibility>
     773            <activity>
     774                <EventListener event="reachedEnemyStation" />
     775            </activity>
     776        </events>
    470777      <templates>
    471778        <Template link=spaceshippirate />
    472779      </templates>
    473780      <controller>
    474         <WaypointPatrolController accuracy=40 alertnessradius=100 team=1>
     781        <WaypointPatrolController active=false accuracy=40 alertnessradius=2000 team=1>
     782            <events>
     783                <activity>
     784                    <EventListener event="reachedEnemyStation" />
     785                </activity>
     786            </events>
    475787          <waypoints>
    476788            <StaticEntity position="-1700,-1400,-940" />
     
    484796    </SpaceShip>
    485797
    486     <SpaceShip visible=true active=true name="Enemies" radarname="Attacker" position="-1700,-1400,-940" lookat="0,0,0" team=1>
     798    <SpaceShip visible=false active=false name="enemy" radarname="Guard" position="-1700,-1400,-940" lookat="0,0,0" team=1>
     799        <events>
     800            <visibility>
     801                <EventListener event="reachedEnemyStation" />
     802            </visibility>
     803            <activity>
     804                <EventListener event="reachedEnemyStation" />
     805            </activity>
     806        </events>
    487807      <templates>
    488808        <Template link=spaceshippirate />
    489809      </templates>
    490810      <controller>
    491         <WaypointPatrolController accuracy=40 alertnessradius=100 team=1>
     811        <WaypointPatrolController active=false accuracy=40 alertnessradius=2000 team=1>
     812            <events>
     813                <activity>
     814                    <EventListener event="reachedEnemyStation" />
     815                </activity>
     816            </events>
    492817          <waypoints>
    493818            <StaticEntity position="-2100,-1200,-1250" />
     
    501826    </SpaceShip>
    502827
    503     <SpaceShip visible=true active=true name="Enemies" radarname="Attacker" position="-2100,-1200,-1250" lookat="0,0,0" team=1>
     828    <SpaceShip visible=false active=false name="enemy" radarname="Guard" position="-2100,-1200,-1250" lookat="0,0,0" team=1>
     829        <events>
     830            <visibility>
     831                <EventListener event="reachedEnemyStation" />
     832            </visibility>
     833            <activity>
     834                <EventListener event="reachedEnemyStation" />
     835            </activity>
     836        </events>
    504837      <templates>
    505838        <Template link=spaceshippirate />
    506839      </templates>
    507840      <controller>
    508         <WaypointPatrolController accuracy=40 alertnessradius=100 team=1>
     841        <WaypointPatrolController active=false accuracy=40 alertnessradius=2000 team=1>
     842            <events>
     843                <activity>
     844                    <EventListener event="reachedEnemyStation" />
     845                </activity>
     846            </events>
    509847          <waypoints>
    510848            <StaticEntity position="-2700,-800,-800" />
     
    518856    </SpaceShip>
    519857
    520 
    521858    </Scene>
    522859</Level>
Note: See TracChangeset for help on using the changeset viewer.