codeAPI Reference

s&box EmitterEntity: Particle emitter entity

calendar_today May 12, 2026 schedule ~1 min read person PatrickJr verified 50

EmitterEntity Component API Reference

EmitterEntity is a world-placed SENT that spawns and controls a particle/VFX emitter. The emitter prefab is defined by a ScriptedEmitter resource. It implements IPlayerControllable for player input.

Type Signature

CSHARP
[Alias("emitter")]
public class EmitterEntity : Component, IPlayerControllable
{
    [Property, ClientEditable]
    public ScriptedEmitter Emitter { get; set; }

    [Property, ClientEditable]
    public EmitMode Mode { get; set; } = EmitMode.Toggle;

    [Property, Sync, ClientEditable, Group("Input")]
    public ClientInput ToggleInput { get; set; }

    [Property, Sync, ClientEditable, Group("Input")]
    public ClientInput HoldInput { get; set; }

    [Sync]
    public bool IsEmitting { get; private set; }

    [Property, ClientEditable]
    public bool ManualOn { get; set; }
}

Properties

IPlayerControllable Implementation

Usage

CSHARP
// Create an emitter that toggles on/off
var emitter = GameObject.Components.Create<EmitterEntity>();
emitter.Emitter = myEmitterResource;
emitter.Mode = EmitMode.Toggle;
emitter.ManualOn = true; // Force on

Notes

  • Alias is "emitter" for spawning via console
  • Spawns particle instance as child when IsEmitting becomes true
  • Destroys particle instance when IsEmitting becomes false
  • ManualOn overrides input state
  • IsEmitting is synced via RPC.Broadcast
  • Particle instance is recreated if Emitter resource changes
Was this helpful?