class ParticleFX extends Visual (client-side)
Available since version: 0.3.8.0
This class represents a particle effect visual attached to a Vob. A ParticleFX instance cannot be created directly. Use a PFX visual in the Vob constructor or assign one through the Vob visual property.
Properties
string name (read-only)
Represents the name of the particle effect visual.
bool neverDies
Represents whether the particle effect is never considered dead by the engine. This is useful for persistent looping effects attached to a Vob.
bool dontKillWhenDone
Represents whether the Vob should be kept after the particle effect finishes.
bool forceEveryFrameUpdate
Represents whether the particle effect is updated every frame, even when it would normally be skipped by the engine update optimization.
bool isOneShot
Represents whether the particle effect is configured as a one-shot effect.
bool renderUnderwaterOnly
Represents whether the particle effect is rendered only underwater.
bool isDead (read-only)
Checks whether the particle effect is currently considered dead by the engine.
float timeScale
Represents the playback speed multiplier of the particle effect.
Methods
setEmitter
Sets the particle emitter used by this effect without starting its output.
int setEmitter(string emitter, int level)
Parameters:
stringemitter: the particle emitter instance name.intlevel: the particle effect level.
Returns int:
the engine result code.
setAndStartEmitter
Sets the particle emitter and starts its output.
int setAndStartEmitter(string emitter, int level)
Parameters:
stringemitter: the particle emitter instance name.intlevel: the particle effect level.
Returns int:
the engine result code.
stop
Stops emitting new particles while keeping the effect object alive.
void stop()
restore
Restores particle emission after it has been stopped.
void restore()
createParticles
Creates particles for the current emitter.
void createParticles()
getParticleCount
Returns the number of particles rendered by the effect during the current frame.
int getParticleCount()
Returns int:
Callbacks
No callbacks.