Particle Engine

From Graal Bible
Revision as of 13:19, 3 September 2005 by CheeToS (talk | contribs) (→‎Reference)

Reference

emitter

 delaymin - Minimum time before another particle is emitted
 delaymax - Maximum time before another particle is emitted
 nrofparticles - Number of particles to release at once
 firstinfront - Tells whether particles drawn after the first particle should draw on top or below the first
 attachposition - Tells whether or not x/y position of particles is relative to the position of the emitter
 emissionoffset - How far away from the emitter (or the level if attachposition=false) to emit particles. Format: {x,y,z}
 particle
   lifetime - Time (in seconds) before a particle is hidden
   image - Image to use for the particle
   mode - Drawing mode of the image. (0 = add, 1 = replace, 2 = subtract) See changeimgmode
   alpha - Alpha transparency of a particle (0 = invisible, 1 = opaque)
   zoom - Zoomfactor of a particle
   angle - Angle the particle should move at
   zangle - Height angle of the particle
   speed - How many pixels the particle should move (every .05 seconds)
   rotation - How much to rotate the image
   spin - How many times the particle should spin before it is destroyed
   stretchx - How much to stretch the particle image horizontally
   stretchy - How much to stretch the particle image vertically
   red, green, blue - Used to change color of particle
   movementvector - Unknown (format is {float,float,float})
     Parameters:
     First - Affects distance east
     Second - Affects distance south
     Third - Affects distance north
 addlocalmodifier("string",float,float,"string","string",float,float)
   Parameters:
   First - Tells when to do an action
     once - Do it once
     range - Do the action during the range of time param2-param3
     impulse - Do it randomly
   Second - Tells the minimum time to wait before doing an action (except for 'range')
   Third - Tells the maximum time to wait before doing an action (except for 'range')
   Fourth - Tells what action to perform
     Everything under "particle" except for image can be changed
     x - x position of the particle
     y - y position of the particle
   Fifth - Tells what to do with parameters 6 and 7
     add - Add the amount (use negatives to subtract)
     replace - Set a new amount
     multiply - Multiply the amount (use negatives to divide)
   Sixth - Minimum amount
   Seventh - Maximum amount
 addglobalmodifier() - Same as addlocalmodifier, except it affects all particles at once
 addemitmodifier() - Same as addlocalmodifier, except it affects all particles the emitter emits
 addmod() - Used in conjunction with addlocalmodifier, same parameters except no parameters 1-3
 emit() - Begin emitting particles
 maxparticles - Maximum number of particles that can exist at once
 currentparticlecount - Current number of particles that exist
 emittedparticles - Total number of particles that have been emitted
 autorotation - Unknown (boolean)
 checkbelowterrain - If true, the particle will be destroyed if it falls below the terrain height (0 for flat GMaps)
 clippingbox - Format of {x1,y1,z1,x2,y2,z2}, particles that leave this box will be destroyed