✨ 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
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
Particle inherits from Base Entity Class, sharing it's methods and functions:
Base Entityscripting-reference/classes/base-classes/Entity
Base Entityscripting-reference/classes/base-classes/Entity
Returns | Name | Description | |
---|---|---|---|
table of Base Entity | GetAll | Returns a table containing all Entities of the class this is called on | |
Base Entity | GetByIndex | Returns a specific Entity of this class at an index | |
integer | GetCount | Returns how many Entities of this class exist | |
table of table | GetInheritedClasses | Gets a list of all directly inherited classes from this Class created with the Inheriting System | |
iterator | GetPairs | Returns an iterator with all Entities of this class to be used with pairs() | |
table or nil | GetParentClass | Gets the parent class if this Class was created with the Inheriting System | |
table | Inherit | Inherits this class with the Inheriting System | |
boolean | IsChildOf | Gets if this Class is child of another class if this Class was created with the Inheriting System | |
function | Subscribe | Subscribes to an Event for all entities of this Class | |
function | SubscribeRemote | Subscribes to a custom event called from server | |
Unsubscribe | Unsubscribes all callbacks from this Event in this Class within this Package, or only the callback passed |