natiny.particles.get_alive

Lua
natiny.particles.get_alive(particles) -> alive

Returns whether anything is left to happen: the system is emitting at a rate above zero, or it still has live particles.

Parameters

Name Type Description
particles number Particle system handle from natiny.particles.create

Returns

Type Description
boolean true while emitting or while particles are alive

Example

Lua
natiny.particles.stop(explosion)
-- later, every frame:
if not natiny.particles.get_alive(explosion) then
    natiny.particles.destroy(explosion)
end