Skip to content
AEOWUN
Docs Menu

Particles [BETA]

Create temporary particles during Play.

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

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) [BETA]

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() [BETA]

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() [BETA]

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()

[BETA] marks features newer than the current public release. Current release: 0.8.0.