Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 46 and Version 47 of content/LevelHowTo


Ignore:
Timestamp:
Dec 22, 2013, 6:10:31 PM (11 years ago)
Author:
jo
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • content/LevelHowTo

    v46 v47  
    326326
    327327=== Advanced Triggers ===
     328A triggers can be combined in several ways:
     329 * A trigger can have a trigger. The outer trigger can only be triggered, after the inner trigger was triggered:
     330{{{
     331#!xml
     332    <DistanceTrigger name="navigationend" position="0,0,0" distance=950 target="SpaceShip" stayActive="false" delay=1.1>
     333        <DistanceTrigger name="flying4" position="-900,640,600" target="Pawn" distance=60 stayActive="true" delay=1/>
     334    </DistanceTrigger>
     335}}}
     336
     337In "missionOne.oxw" the order the player destroys the boxes should not influence the order the messages arrive, what the player should do next after having destroyed such a box.
     338The solution to this problem is naming each box as "box". When the fist box is destroyed, the innermost EventTrigger listens to the event "box" and creates the "boxtrigger1" event in return. Similarly, when the next box is destroyed later, the innermost EventTrigger is not triggered again, as it stays active. That way, the next EventTrigger is triggered that way.
     339{{{
     340#!xml
     341    <EventTrigger name="boxtrigger4" activations="1" stayactive="true" delay=0.1>
     342      <events>
     343        <trigger>
     344          <EventListener event="box" />
     345        </trigger>
     346      </events>
     347      <EventTrigger name="boxtrigger3" activations="1" stayactive="true" delay=0.1>
     348        <events>
     349          <trigger>
     350            <EventListener event="box" />
     351          </trigger>
     352        </events>
     353        <EventTrigger name="boxtrigger2" activations="1" stayactive="true" delay=0.1>
     354          <events>
     355            <trigger>
     356              <EventListener event="box" />
     357            </trigger>
     358          </events>
     359          <EventTrigger name="boxtrigger1" activations="1" stayactive="true" delay=0.1>
     360            <events>
     361              <trigger>
     362                <EventListener event="box" />
     363              </trigger>
     364            </events>
     365          </EventTrigger>
     366        </EventTrigger>
     367      </EventTrigger>
     368    </EventTrigger>
     369}}}
     370
     371
    328372{{{
    329373#!xml
     
    335379#!xml
    336380<DistanceTrigger name="switchBillboards" position="-900,640,600" target="Pawn" distance=70 stayActive="true" delay=1/>
     381
    337382<!-- switchBillboards makes this billboard INVISIBLE -->
    338383<BlinkingBillboard position="-900,640,600" frequency=0.6 amplitude=3 material="Flares/lensflare" colour="1,1,0.05">
     
    349394          </events>
    350395</BlinkingBillboard>
     396
    351397<!-- switchBillboards makes this billboard VISIBLE -->
    352398<Billboard position="-900,640,600" amplitude=1 material="Flares/lensflare" colour="0,0.8,0.1">