Particle¶

Tip
Both Cascade and Niagara Particle Systems are supported!
Tip
You can spawn this entity is both Client or Server (if you spawn it on client, it won’t be synchronized with other players).
Usage¶
local my_particle = Particle(
Vector(-200, 100, 100),
Rotator(0, 0, 0),
"NanosWorld::P_Explosion",
true, -- Auto Destroy?
true -- Auto Activate?
)
Note
AutoDestroy means the Network 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.
Constructor Parameters¶
Type |
Name |
Default |
location |
Vector(0, 0, 0) |
|
rotation |
Rotator(0, 0, 0) |
|
model_name |
||
auto_destroy |
true |
|
auto_activate |
true |
Functions¶
Returns |
Name |
Description |
|
Reset() |
Activates the Emitter again |
Functions (Inherited from Actor)¶
Returns |
Name |
Description |
|
AddImpulse(Vector force) |
Applies a Force in world coordinate on this Actor (the force is applied on Client side, by the (in most of cases) the closest player of this object) |
||
AttachTo(Actor other, string bone_name, Vector relative_location, Rotator relative_rotation) |
Attaches this Actor to any other Actor with a Relative Offset/Rotation |
||
Destroy() |
Destroys this Actor |
||
SetCollision(number collision_type) |
Sets the actor’s collision (0 - Normal, 1 - Static Only, 2 - No Collision) |
||
SetGravityEnabled(boolean new_gravity) |
Sets the actor’s gravity enabled |
||
SetHighlightEnabled(boolean enabled) |
Sets if this Actors is Highlighting |
||
SetInitialLocation(Vector new_initial_location) |
Sets the initial location |
||
SetLocation(Vector new_location) |
Sets the actor’s location in the game world |
||
SetMaterialColorParameter(string parameter_name, Color color, number material_index = -1) |
Sets a Color parameter on a material of this actor, optionally on a specific material index or -1 for all materials |
||
SetMaterialScalarParameter(string parameter_name, number scalar, number material_index = -1) |
Sets a Scalar parameter on a material of this actor, optionally on a specific material index or -1 for all materials |
||
SetMaterialTextureParameter(string parameter_name, string texture_path, number material_index = -1) |
Loads and sets a Texture parameter on a material of this actor, optionally on a specific material index or -1 for all materials |
||
SetMaterialVectorParameter(string parameter_name, Vector vector, number material_index = -1) |
Sets a Vector parameter on a material of this actor, optionally on a specific material index or -1 for all materials |
||
SetRotation(Rotator new_rotation) |
Sets the actor’s rotation in the game world |
||
SetScale(Vector Scale) |
Sets the actor’s scale |
||
SetTintColor(Color new_tint_color) |
Sets the tint color, for completely paint an object, multiply the color by 10 or 100 |
||
SetValue(string key, any value) |
Sets a value in this entity, which can be accessed by any package (local only) |
||
Smoothly moves this actor to a Location with a certain Speed |
|||
Smoothly rotates this actor to a Rotation with a certain Speed |
|||
IsGravityEnabled() |
Gets the actor’s gravity enabled |
||
IsInWater() |
Gets if the actor is in Water |
||
IsValid() |
Returns if this is Valid |
||
GetCollision() |
Gets the current actor’s collision |
||
GetID() |
Gets the network ID of this entity (same in both client and server) |
||
GetLocation() |
Get the actor’s position in the game world |
||
GetInitialLocation() |
Gets the initial location |
||
GetRotation() |
Gets the actor’s rotation in the game world |
||
GetScale() |
Gets the actor’s scale |
||
GetTintColor() |
Gets the Tint Color |
||
GetType() |
Returns the type of this Actor |
||
any |
GetValue(string key) |
Gets a value given a key |
|
GetVelocity() |
Returns the current actor Velocity |