β¨ Particle
Class to spawn Particle Systems used to create effects in the world.
πAuthority
πͺInheritance
This class shares methods and events from Base Entity, Base Actor.
π§βπ»API Source
This page is auto-generated! The Functions, Properties and Events described here are defined in our GitHub's API Repository! Feel free to commit suggestions and changes to the source .json API files!
tip
Both Cascade and Niagara Particle Systems are supported!
π Examplesβ
local my_particle = Particle(
Vector(-200, 100, 100),
Rotator(0, 0, 0),
"nanos-world::P_Explosion",
true, -- Auto Destroy?
true -- Auto Activate?
)
π Constructorsβ
Default Constructor
No description provided
local my_particle = Particle(location, rotation, asset, auto_destroy?, auto_activate?)
Type | Name | Default | Description |
---|---|---|---|
Vector | location | Required parameter | No description provided |
Rotator | rotation | Required parameter | No description provided |
Particle Reference | asset | Required parameter | No description provided |
boolean | auto_destroy | true | No description provided |
boolean | auto_activate | true | No description provided |
Note
auto_destroy
means the Entity will be immediately destroyed after spawned, losing references to the Particle System spawned in-game. So if the Particle System itself loops indefinitely, it will keep playing until the Player reconnects.
πΏ Static Functionsβ
Inherited Entity Static Functions
This class doesn't have own static functions.
π¦ Functionsβ
Inherited Entity Functions
Inherited Actor Functions
Returns | Name | Description | |
---|---|---|---|
![]() | Activate | Activates the Emitter | |
![]() | Deactivate | Deactivate the Emitter | |
![]() | boolean | IsActive | Returns if this Particle is active |
![]() | SetParameterBool | Sets a boolean parameter in this Particle System | |
![]() | SetParameterColor | Sets a Color parameter in this Particle System | |
![]() | SetParameterFloat | Sets a float parameter in this Particle System | |
![]() | SetParameterInt | Sets an integer parameter in this Particle System | |
![]() | SetParameterMaterial | Sets a Material parameter in this Particle System | |
SetParameterMaterialFromCanvas | Sets a Material from a Canvas parameter in this Particle System | ||
SetParameterMaterialFromTexture | Sets a Material from a Texture parameter in this Particle System | ||
SetParameterMaterialFromWebUI | Sets a Material from a Canvas parameter in this Particle System | ||
![]() | SetParameterVector | Sets a Vector parameter in this Particle System |

Activate
Activates the Emitter
my_particle:Activate(should_reset)
Type | Parameter | Default | Description |
---|---|---|---|
boolean | should_reset | Required parameter | If should reset |
See also Deactivate, IsActive.

Deactivate
Deactivate the Emitter
my_particle:Deactivate()

IsActive
Returns if this Particle is active
β Returns boolean.
local ret = my_particle:IsActive()
See also Activate, Deactivate.

SetParameterBool
Sets a boolean parameter in this Particle System
my_particle:SetParameterBool(parameter, value)
Type | Parameter | Default | Description |
---|---|---|---|
string | parameter | Required parameter | The parameter name |
boolean | value | Required parameter | The boolean value |

SetParameterColor
Sets a Color parameter in this Particle System
my_particle:SetParameterColor(parameter, value)
Type | Parameter | Default | Description |
---|---|---|---|
string | parameter | Required parameter | The parameter name |
Color | value | Required parameter | The Color value |

SetParameterFloat
Sets a float parameter in this Particle System
my_particle:SetParameterFloat(parameter, value)
Type | Parameter | Default | Description |
---|---|---|---|
string | parameter | Required parameter | The parameter name |
float | value | Required parameter | The float value |

SetParameterInt
Sets an integer parameter in this Particle System
my_particle:SetParameterInt(parameter, value)
Type | Parameter | Default | Description |
---|---|---|---|
string | parameter | Required parameter | The parameter name |
integer | value | Required parameter | The int value |

SetParameterMaterial
Sets a Material parameter in this Particle System
my_particle:SetParameterMaterial(parameter, value)
Type | Parameter | Default | Description |
---|---|---|---|
string | parameter | Required parameter | The parameter name |
Material Reference | value | Required parameter | The Material value |

SetParameterMaterialFromCanvas
This will create a Material and set this Canvas as it's parameter internally, then set the Material into the Particle parameter
my_particle:SetParameterMaterialFromCanvas(parameter, value)
Type | Parameter | Default | Description |
---|---|---|---|
string | parameter | Required parameter | The parameter name |
Canvas | value | Required parameter | The Canvas value |

SetParameterMaterialFromTexture
This will create a Material and set this Texture as it's parameter internally, then set the Material into the Particle parameter
my_particle:SetParameterMaterialFromTexture(parameter, value)
Type | Parameter | Default | Description |
---|---|---|---|
string | parameter | Required parameter | The parameter name |
Image Path | value | Required parameter | The Texture value |

SetParameterMaterialFromWebUI
This will create a Material and set this WebUI as it's parameter internally, then set the Material into the Particle parameter
my_particle:SetParameterMaterialFromWebUI(parameter, value)
Type | Parameter | Default | Description |
---|---|---|---|
string | parameter | Required parameter | The parameter name |
WebUI | value | Required parameter | The WebUI value |

SetParameterVector
Sets a Vector parameter in this Particle System
my_particle:SetParameterVector(parameter, value)
Type | Parameter | Default | Description |
---|---|---|---|
string | parameter | Required parameter | The parameter name |
Vector | value | Required parameter | The Vector value |
π Eventsβ
Inherited Entity Events
Inherited Actor Events
This class doesn't have own events.