Skip to content
AEOWUN
Docs Menu

Particles

Create temporary particles during Play.

particles.burst(preset, position [, count])

Create a burst of temporary particles.

Arguments

preset: fire, smoke, sparks, or magic string. position: [x, y, z] finite numbers. count: whole number 0–1024, default 24.

Returns

The number of particles created.

Works with

The current Play session.

Missing values and errors

Unknown presets, non-finite coordinates, and invalid counts report an error.

debug.log(particles.burst("sparks", [0, 2, 0], 24))

particles.set_enabled(emitter, enabled)

Enable or disable a ParticleEmitter Cell.

Arguments

emitter: ParticleEmitter Cell handle. enabled: bool.

Returns

nil.

Works with

The current Play session.

Missing values and errors

Other handle kinds and Cell types report an error.

const emitters = find("CampfireParticles")
if basket.len(emitters) > 0 {
    particles.set_enabled(emitters[0], true)
}

particles.count()

Count active particles.

Arguments

No arguments.

Returns

The active particle count.

Works with

The current Play session.

Missing values and errors

Arguments are not accepted.

debug.log(particles.count())

particles.clear()

Remove all active particles.

Arguments

No arguments.

Returns

nil.

Works with

The current Play session.

Missing values and errors

Arguments are not accepted.

particles.clear()