Skip to content

Class: particle

Particle playback action.

Source

C++ class particle

Custom Constructor

particle

Remarks

Bone-attached particles require the controlled object visual to contain the requested bone. Position-only particles use world coordinates.

Extends

Constructors

Constructor

ts
new particle(
   particle_to_run: string, 
   particle_params?: particle_params, 
   auto_remove?: boolean): particle;

Create a particle action.

Parameters

ParameterTypeDescription
particle_to_runstringParticle effect name.
particle_params?particle_paramsOptional transform parameters.
auto_remove?booleanWhether the particle should be removed after playback.

Returns

particle

Overrides

EngineBinding.constructor

Constructor

ts
new particle(
   particle_to_run: string, 
   bone_name: string, 
   particle_params: particle_params, 
   auto_remove: boolean): particle;

Create a particle action attached to a bone.

Parameters

ParameterTypeDescription
particle_to_runstringParticle effect name.
bone_namestringBone name.
particle_paramsparticle_paramsTransform parameters.
auto_removebooleanWhether the particle should be removed after playback.

Returns

particle

Overrides

ts
EngineBinding.constructor

Methods

completed()

ts
completed(): boolean;

Returns

boolean

Whether particle playback is complete.


set_angles()

ts
set_angles(vector: vector): void;

Set particle angles.

Parameters

ParameterTypeDescription
vectorvectorAngles.

Returns

void


set_bone()

ts
set_bone(bone_id: string): void;

Set attached bone.

Parameters

ParameterTypeDescription
bone_idstringBone name.

Returns

void


set_particle()

ts
set_particle(value1: string, value2: boolean): void;

Set particle effect and auto-remove flag.

Parameters

ParameterTypeDescription
value1stringParticle effect name.
value2booleanWhether the particle should be removed after playback.

Returns

void


set_position()

ts
set_position(vector: vector): void;

Set particle position.

Parameters

ParameterTypeDescription
vectorvectorPosition.

Returns

void


set_velocity()

ts
set_velocity(vector: vector): void;

Set particle velocity.

Parameters

ParameterTypeDescription
vectorvectorVelocity.

Returns

void

Properties

__name

ts
readonly __name: string;

LuaBind instance constructor name.

Inherited from

EngineBinding.__name


__name

ts
readonly static __name: string;

LuaBind class constructor name.

Inherited from

EngineBinding.__name