Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 6, 2009, 5:38:45 AM (15 years ago)
Author:
landauf
Message:

Added fancy particle effects in the pong level, based on the named events fired by the Pong gametype. Also added a new particle effect with colorful sparks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/data/levels/presentation_pong.oxw

    r5695 r5891  
    3232      <Backlight scale=0.2 colour="1.0, 1.0, 0.5" width=7 length=500 lifetime=0.3 elements=20 trailmaterial="Trail/backlighttrail" material="Examples/Flare" />
    3333      <Light type=point diffuse="1.0, 1.0, 0.5" specular="1.0, 1.0, 0.5" attenuation="1200, 1.0, 0.0035, 0.00005" />
    34     </attached>
     34      <ParticleSpawner name=hiteffect position="0,0,0" source="Orxonox/sparks2" lifetime=0.01 autostart=0 mainstate=spawn />
     35    </attached>
     36    <eventlisteners>
     37      <EventTarget target=hiteffect />
     38    </eventlisteners>
    3539  </PongBall>
    3640</Template>
     
    6266          <Model position="0,0,60" mesh="cube.mesh" scale3D="105,1,1" />
    6367          <Model position="0,0,-60" mesh="cube.mesh" scale3D="105,1,1" />
    64 <!--
    65           <ParticleSpawner name=scoreeffect_R position=" 100,0, 60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
    66           <ParticleSpawner name=scoreeffect position="  50,0, 60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
    67           <ParticleSpawner name=scoreeffect position="   0,0, 60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
    68           <ParticleSpawner name=scoreeffect position=" -50,0, 60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
    69           <ParticleSpawner name=scoreeffect_L position="-100,0, 60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
    70           <ParticleSpawner name=scoreeffect_R position=" 100,0,-60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
    71           <ParticleSpawner name=scoreeffect position="  50,0,-60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
    72           <ParticleSpawner name=scoreeffect position="   0,0,-60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
    73           <ParticleSpawner name=scoreeffect position=" -50,0,-60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
    74           <ParticleSpawner name=scoreeffect_L position="-100,0,-60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
    75 -->
     68
     69          <ParticleSpawner name=scoreeffect_right position="120,0, 45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
     70          <ParticleSpawner name=scoreeffect_right position="120,0, 30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
     71          <ParticleSpawner name=scoreeffect_right position="120,0, 15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
     72          <ParticleSpawner name=scoreeffect_right position="120,0,  0" source="Orxonox/BigExplosion1part2" lifetime=0.1 autostart=0 />
     73          <ParticleSpawner name=scoreeffect_right position="120,0,-15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
     74          <ParticleSpawner name=scoreeffect_right position="120,0,-30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
     75          <ParticleSpawner name=scoreeffect_right position="120,0,-45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
     76
     77          <ParticleSpawner name=scoreeffect_left position="-120,0, 45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
     78          <ParticleSpawner name=scoreeffect_left position="-120,0, 30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
     79          <ParticleSpawner name=scoreeffect_left position="-120,0, 15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
     80          <ParticleSpawner name=scoreeffect_left position="-120,0,  0" source="Orxonox/BigExplosion1part2" lifetime=0.1 autostart=0 />
     81          <ParticleSpawner name=scoreeffect_left position="-120,0,-15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
     82          <ParticleSpawner name=scoreeffect_left position="-120,0,-30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
     83          <ParticleSpawner name=scoreeffect_left position="-120,0,-45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
     84
     85<?lua
     86for i = 1, 15, 1
     87do ?>
     88          <ParticleSpawner name=scoreeffect_center position="<?lua print(math.random() * 200 - 100) ?>,0,<?lua print(math.random() * 120 - 60) ?>" source="Orxonox/sparks2" lifetime=0.02 autostart=0 startdelay=<?lua print(math.random() * 0.7) ?> />
     89<?lua
     90end
     91?>
     92
    7693        </attached>
    7794      </PongCenterpoint>
     
    8198  <EventDispatcher>
    8299    <targets>
    83       <EventTarget name=scoreeffect />
     100      <EventTarget target=scoreeffect_right />
     101      <EventTarget target=scoreeffect_center />
    84102    </targets>
    85103    <events>
    86104      <spawn>
    87         <EventListener event=pongcenter />
     105        <EventFilter>
     106          <names>
     107            <EventName name=right />
     108          </names>
     109          <EventListener event=pongcenter />
     110        </EventFilter>
     111      </spawn>
     112    </events>
     113  </EventDispatcher>
     114  <EventDispatcher>
     115    <targets>
     116      <EventTarget target=scoreeffect_left />
     117      <EventTarget target=scoreeffect_center />
     118    </targets>
     119    <events>
     120      <spawn>
     121        <EventFilter>
     122          <names>
     123            <EventName name=left />
     124          </names>
     125          <EventListener event=pongcenter />
     126        </EventFilter>
    88127      </spawn>
    89128    </events>
Note: See TracChangeset for help on using the changeset viewer.