API ReferenceGE Extensionsflowgraphnodesscene
Particle Emitter (Flowgraph Node)
- **Node Name:** `Particle Emitter`
Overview
- Node Name:
Particle Emitter - Category:
repeat_instant - File:
extensions/flowgraph/nodes/scene/particleEmitter.lua
Creates and manages a particle emitter in the scene. Supports positioning, rotation, and color control.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Standard inflow |
clear | flow (impulse) | When triggered, clears the particle emitter |
position | vec3 | Position of the particle emitter |
rotation | quat | Rotation of the particle emitter |
color | color | Color of the particle emitter |
Internals
| Field | Purpose |
|---|---|
self.object | Table holding the spawned ParticleEmitterNode and its state |
self.shown | Whether the emitter is currently visible |
Behavior
work()- On each frame:- If no object exists, creates one via
showObject(). - On flow, shows the emitter and updates position.
- On
clearimpulse, hides the emitter.
- If no object exists, creates one via
createObject(name)- Creates aParticleEmitterNodewith theBNGP_confettiemitter andlightExampleEmitterNodeData1datablock.showObject()/hideObject()- Toggles thehiddenproperty on the emitter object._executionStopped()- Deletes the emitter object and cleans up.
How It Works
- On first flow, a
ParticleEmitterNodeis created and added toMissionGroup. - Each frame with flow, the emitter is shown and repositioned.
- A
clearimpulse hides the emitter without deleting it. - On execution stop or mission end, the object is fully deleted.
Key Dependencies
createObject('ParticleEmitterNode')- Torque3D engine call for particle emittersscenetree.MissionGroup:addObject()- adds the emitter to the scene
Additional Methods
C:_afterTrigger()
Called after the node's trigger logic executes.
C:destroy()
Destroys the node and cleans up any created objects.
C:fillFields()
Node method.
C:init(mgr, ...)
Initializes the node, setting up pins and default properties.
Parameters:
mgr...
C:onClientEndMission()
Cleanup callback when the mission/level ends.
C:setPosition()
Node method.
See Also
- Collection Marker (Flowgraph Node) - Related reference
- Custom Lua Command (Flowgraph Node) - Related reference
- Get Object Field (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide