Particle emitters are used to create various realtime particle effects, such as snow, rain or smoke. Particle emitters are always owned by entities or actors. You create a particle emittor by calling the CreateParticleEmitter() method of an entity or of an actor. You can then query the particle emitter using the ParticleEmitter property.
Operations | |
SetBorder | Sets the rectangular area on screens to contain the particles. |
SetBorderThickness | Sets the thickness of the border rectangle defined by SetBorder() method. |
AddSprite | Adds a sprite to be used for particle representation. |
RemoveSprite | Removes a specified sprite from the list. |
Start | Executes the particle generation. |
Stop | Shuts down the particle emitter. |
Pause | Pauses the particle generation. |
Resume | Resumes the particle generation. |
AddGlobalForce | Adds a global force which will affect all particles equally. |
AddPointForce | Adds a point force which will affect the particles depending on their distance from the force origin. |
RemoveForce | Removes a force with the given name. |
Type (read only) | Returns always "particle-emitter" |
X | The X position of the emitter rectangle |
Y | The Y position of the emitter rectangle |
Width | The width of the emitter rectangle |
Height | The height of the emitter rectangle |
Scale1 | The lower value of the scale range for particles |
Scale2 | The upper value of the scale range for particles |
ScaleZBased | Specifies if the scale is dependent on the particle's depth |
Velocity1 | The lower value of the velocity range for particles |
Velocity2 | The upper value of the velocity range for particles |
VelocityZBased | Specifies if the velocity is dependent on the particle's depth |
LifeTime1 | The lower value of the life time range for particles (in milliseconds) |
LifeTime2 | The upper value of the life time range for particles (in milliseconds) |
LifeTimeZBased | Specifies if the life time is dependent on the particle's depth |
Angle1 | The lower value of the initial direction range for particles (in degrees, 0 degrees = up) |
Angle2 | The upper value of the initial direction range for particles (in degrees, 0 degrees = up) |
AngVelocity1 | The lower value of the angular velocity (rotation speed) for particles |
AngVelocity2 | The upper value of the angular velocity (rotation speed) for particles |
Rotation1 | The lower value of the initial rotation range for particles (in degrees, 0 degrees = up) |
Rotation2 | The upper value of the initial rotation range for particles (in degrees, 0 degrees = up) |
Alpha1 | The lower value of the alpha transparency range for particles (0 to 255) |
Alpha2 | The upper value of the alpha transparency range for particles (0 to 255) |
AlphaTimeBased | Specifies if the actual alpha value of the particle changes with time |
GrowthRate1 | The lower value of the growth/shrink rate range for particles (in percent) |
GrowthRate2 | The upper value of the growth/shrink rate range for particles (in percent) |
ExponentialGrowth | Specifies if the particles grow/shrink exponentially (the bigger they are, the faster they grow) or linear |
UseRegion | If set to true, the particles are only visible when they are inside a region (only works for particle emitters owned by region entities) |
MaxParticles | Specifies the maximum number of particles to be ever generated |
NumLiveParticles (read only) | Returns the number of currently active particles on screen |
GenerationInterval | The time interval in which new particles are being generated (in milliseconds) |
GenerationAmount | Specifies the amount of particles to be generated for each GenerationInterval |
MaxBatches | Specifies the maximum number of particle batches to be generated (0=no limit) |
FadeInTime | The time it takes the particles to fade in when they are generated (in milliseconds) |
FadeOutTime | The time it takes the particles to fade out when they are dying (in milliseconds) |
BlendMode | Specifies how the particles' images are blended with the background colors; 0...normal mode, 1...additive blending, 2...subtractive blending |
EmitEvent | The name of an event which is triggered in the emitter's owner object whenever a new batch of particles is generated. |
Sets the rectangular area on screens to contain the particles.
Returns true if the method succeeded.
The border rectangle limits the area the particles can exist in. Once the particle hits the border rectangle, it dies. You can specify the thickness of the border using the SetBorderThickness() method. Call this method without parameters to disable border.
Sets the thickness of the border rectangle defined by SetBorder() method.
Returns true if the method succeeded.
Adds a sprite to be used for particle representation.
Returns true if the method succeeded.
You can add as many sprites as you want. When a new particle is generated, it gets assigned one random sprite from the list.
Removes a specified sprite from the list.
Returns true if the method succeeded.
Executes the particle generation.
Returns true if the method succeeded.
The InitialTime parameter is used to populate the emitter with particles before it's first displayed on screen. Don't use too long time not to delay the game execution.
Shuts down the particle emitter.
Returns true if the method succeeded.
Pauses the particle generation.
Returns true if the method succeeded.
Resumes the particle generation.
Returns true if the method succeeded.
Adds a global force which will affect all particles equally.
Returns true if the method succeeded.
Adds a point force which will affect the particles depending on their distance from the force origin.
Returns true if the method succeeded.
Removes a force with the given name.
Returns true if the method succeeded.