XML/Splash particle

From MegaGlest
Revision as of 07:55, 1 December 2008 by 66.97.125.26 (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Splash particle systems are most commonly used to create special effects from a unit being attacked.

<?xml version="1.0" standalone="yes"?>
<splash-particle-system>
                                     <!-- An optional texture used for each particle (what does luminance do exactly?) -->
    <texture value="true|false" path=".../texture_name.bmp" luminance="true"/>
                                     <!-- An optional model can be used. -->
    <model value="true|false" path=".../model_name.g3d"/>
    <primitive value="quad|line"/>   < This shows the shape of the particle.  Line is like a line, quad is like a circle. -->
    <offset x="0" y="0" z="0"/>      <!-- This can offset the entire splash from directly in front of the end of the projection where it would normally end. -->
                                     <!-- Colors at epicentre (specifically of a particle when it's first created) -->
    <color red="0.0" green="0.0" blue="1.0" alpha="0.5" />
                                     <!-- Colors at edge (specifically, the color the particle will become when it runs
                                          out of energy) -->
    <color-no-energy red="1.0" green="1.0" blue="1.0" alpha="0.0" />
    <size value="1" />               <!-- Particle start size (center) -->
    <size-no-energy value="2" />     <!-- Ending particle size -->
    <speed value="5" />              <!-- The Maximum Radius of the explosion -->
    <gravity value="0"/>             <!-- Gravity effects -->
    <emission-rate value="20" />     <!-- How many particles are emitted -->
    <energy-max value="30" />        <!-- Energy -->
    <energy-var value="10" />        <!-- Variation -->
    <emission-rate-fade value="1"/>  <!-- Particles last longer with a lower number / disappear quicker with a higher
                                          number -->
    <vertical-spread a="0" b="0"/>   <!-- Direction splash goes after hitting -->
    <horizontal-spread a="1" b="0"/> <!-- Direction splash goes after hitting -->
</splash-particle-system>

Clarifications: The energy value is actually the number of server frames (40 per second) the particle will be "alive." As the particle reaches it's end of life, the color will transition from the value specified by <color> to the value specified by <color-no-energy>. Similarly, the size of each particle starts out the value specified by <size> and gradually decreases to <size-no-energy> as it runs out of energy. (And please do correct any of this if you find it to be inaccurate.)

Back to XML_Definitions