Particle Scripts

From Multiverse

Jump to: navigation, search

Particle script syntax

A particle script is a text file interpreted by the Multiverse Client. The general syntax of a particle script is:

name
{
 attribute value
 ...
 emitter type
 {
  attribute value
  ...
 }
 affector type
 {
  attribute value
  ...
 }
 ...
}

Where:

  • name is the name of the particle effect. The name must be unique.
  • Following the name is a list of the the particle system attributes and their values, with one attribute on each line. For more information, see Particle System Attributes.
  • The emitter section describes the shape of the origin of the particle effect (point, ring, and so on) and its corresponding properties. See Particle Emitters. A particle script must have exactly one emitter section.
  • The affector sections describe effets that modify a particle effect. See Particle Affectors. The affector section is optional, and a particle script can have more than one.

Example

For example:

// A sparkly purple fountain
Examples/PurpleFountain
{
   material Examples/Flare2
   particle_width 20
   particle_height 20
   cull_each false
   quota 10000
   billboard_type oriented_self

   // Area emitter
   emitter Point
   {
       angle 15
       emission_rate 75
       time_to_live 3
       direction 0 1 0
       velocity_min 250
       velocity_max 300
       colour_range_start 1 0 0
       colour_range_end 0 0 1
   }

   // Gravity
   affector LinearForce
   {
       force_vector 0 -100 0
       force_application add
   }

   // Fader
   affector ColourFader
   {
       red -0.25
       green -0.25
       blue -0.25
   }
}
Personal tools