Particles
Manual particle emission on entities that have a particle emitter.
Namespace: caffeine.particles
emit#
Lua: caffeine.particles.emit
text
emit(entity, count)
Spawns particles immediately at the entity position with random velocities. Does nothing if the entity has no emitter.
| Parameters | Type | Description |
|---|---|---|
entity | number | Entity id. |
count | number | Number of particles to spawn; stops at the emitter's maximum. |
Returns: none
Example
lua
caffeine.particles.emit(e, 20)