Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 1, 2009, 6:48:51 PM (15 years ago)
Author:
rgrieder
Message:

Added better engine effects: you can still add any WorldEntity to the MultiStateEngine, but you have to enclose it in an EffectContainer that has one XMLParameter called "condition". There you can write conditions containing the following words: and, or, not, idle, normal, boost, brake. The last four words are mutually exclusive states.
For an example see spaceship_assff.oxt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/data/levels/templates/spaceship_assff.oxt

    r6147 r6187  
    7070   accelerationupdown    =  125
    7171  >
    72     <active>
     72    <EffectContainer condition="idle">
     73      <WorldSound mainstate="activity" source="sounds/Engine_idle.ogg" loop=1 active=false/>
     74    </EffectContainer>
     75    <EffectContainer condition="not idle">
    7376      <FadingBillboard mainstate=activity active=false scale=0.1 position="0, 0, 9" colour="0.2, 0.65, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
    7477<!--
     
    7679      <Light mainstate=visibility position="-8, 0, 8" diffuse="0.3, 0.6, 1.0" specular="0.3, 0.6, 1.0" attenuation="600, 1.0, 0.007, 0.0002" type=point />
    7780-->
    78       <!--WorldSound mainstate=activity source="sounds/Engine_low.ogg" loop=1 /-->
    79     </active>
    80     <forward>
     81    </EffectContainer>
     82    <EffectContainer condition="normal or brake">
     83      <WorldSound mainstate="activity" source="sounds/Engine_low.ogg" loop=1 active=false/>
     84    </EffectContainer>
     85    <EffectContainer condition="normal or boost">
    8186      <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 7.6, 0, 6" colour="0.2, 0.65, 1.0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
    8287      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.6, 0, 6" colour="0.2, 0.65, 1.0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
    83       <WorldSound mainstate=activity source="sounds/Engine_low.ogg" loop=1 />
    84     </forward>
    85     <boost>
     88    </EffectContainer>
     89    <EffectContainer condition="boost">
    8690      <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 7.6, 0, 6" colour="0.6, 0.75, 0.8, 0.7" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
    8791      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.6, 0, 6" colour="0.6, 0.75, 0.8, 0.7" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
    88       <!--WorldSound mainstate=activity source="sounds/Engine_high.ogg" loop=1 /-->
    89     </boost>
    90     <brake>
     92      <WorldSound mainstate="activity" source="sounds/Engine_high.ogg" loop=1 active=false/>
     93    </EffectContainer>
     94    <EffectContainer condition="brake">
    9195      <FadingBillboard mainstate=activity active=false scale=0.3 position=" 8, 0, 6" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
    9296      <FadingBillboard mainstate=activity active=false scale=0.3 position="-8, 0, 6" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
    9397      <FadingBillboard mainstate=activity active=false scale=0.15 position=" 8, 0, 6" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
    9498      <FadingBillboard mainstate=activity active=false scale=0.15 position="-8, 0, 6" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
    95     </brake>
     99    </EffectContainer>
    96100  </MultiStateEngine>
    97101</Template>
Note: See TracChangeset for help on using the changeset viewer.