Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 47 and Version 48 of content/LevelHowTo


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

Legend:

Unmodified
Added
Removed
Modified
  • content/LevelHowTo

    v47 v48  
    369369}}}
    370370
    371 
    372 {{{
    373 #!xml
    374 
    375 }}}
     371 * A trigger can have several triggers that are combined with boolean logic:
     372{{{
     373#!xml
     374    <Trigger name="duball2" mode="and" stayactive="true">
     375        <EventTrigger activations="1" stayactive="true" delay=4 >
     376           <events>
     377              <trigger>
     378                 <EventListener event="duball1" />
     379              </trigger>
     380           </events>
     381        </EventTrigger>
     382        <EventTrigger activations="1" invert="true">
     383          <events>
     384            <trigger>
     385              <EventListener event="toHydroFarmer" />
     386            </trigger>
     387          </events>
     388        </EventTrigger>
     389    </Trigger>
     390}}}
     391In this case the "duball2" event triggers a message but only, if the event "toHydroFarmer" was not triggered before. This is achieved by inverting (not-operation) the "toHydroFarmer" event and combining the two corresponding EventTriggers with "and".
     392
    376393=== What events can do ===
    377394 * Making objects (in)visible:
     
    410427</Billboard>
    411428}}}
    412  * (De)activating objects:
    413 {{{
    414 #!xml
    415 
     429 * (De)activating objects. In "missionOne.oxw" if the player dies after having taken the spacecruiser, the player should be respawned with the other spaceship at a sensible place. This is managed by deactivating the old TeamSpawnPoint and activating a new TeamSpawnPoint.
     430{{{
     431#!xml
     432    <TeamSpawnPoint team=0 position="2000,1500,-1500" direction="-1,-1,1" spawnclass=SpaceShip pawndesign=spaceshipspacecruiser>
     433        <events>
     434            <activity>
     435                <EventListener event="attack" />
     436            </activity>
     437        </events>
     438    </TeamSpawnPoint>
     439}}}
     440
     441{{{
     442#!xml
     443    <SpaceShip position="3000,-4000,4000" lookat="-1300,-600,900" name="attacker"visible="true">
     444        <events>
     445            <visibility>
     446                <EventListener event="ondock" />
     447            </visibility>
     448        </events>
     449        <templates>
     450            <Template link=spaceshippirate /> <!--spaceshipTransporter -->
     451        </templates>
     452        <controller>
     453            <WaypointPatrolController alertnessradius=3129 team=1 active=false>
     454                <waypoints>
     455                    <Model mesh="cube.mesh" scale=0 position="-1300,-600,900" />
     456                    <Model mesh="cube.mesh" scale=0 position="0,0,0" />
     457                </waypoints>
     458                <events>
     459                    <activity>
     460                        <EventListener event="attack" /> <!-- activates enemies-->
     461                     </activity>
     462                </events>
     463            </WaypointPatrolController>
     464        </controller>
     465    </SpaceShip>
    416466}}}
    417467 * Executing '''ConsoleCommands''' (= executing code):