![]() |
Dayz Explorer 1.28.160049
|
Entity which has the particle instance as an ObjectComponent. More...
Protected Member Functions | |
| void | ParticleInit () |
| Empty - Only needed for Particle. | |
| proto native void | SetParticleAutoDestroyFlags (ParticleAutoDestroyFlags flags) |
| Enables the particle to automatically clean up itself when ending or stopping. | |
| void | DisableAutoDestroy () |
| Disables the particle automatically cleaning up itself when ending or stopping. | |
| proto native int | GetParticleAutoDestroyFlags () |
| Gets the currently set ParticleAutoDestroyFlags flags set on this ParticleSource. | |
Events | |
ParticleBase events For ParticleSource, these are handed on C++ side For more information, read ParticleEvents | |
| void | OnParticleParented (IEntity parent) |
| Event when the particle receives a parent. | |
| void | OnParticleUnParented (IEntity parent) |
| Event when the particle is orphaned. | |
| void | OnParticleStop () |
| Event when the particle stops. | |
Misc backwards compatibility helpers | |
Helpers for misc backwards compatibility functionality | |
| override void | AddAsChild (Object parent, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_rotation_to_world=false) |
| Attaches this particle onto some object. If null value is provided then the particle will be detached from the current parent. | |
Parameter API | |
Helpful methods for getting or setting parameters | |
| override void | SetParticleParam (int parameter_id, float value) |
| Set the value of a parameter of all emitors in the particle. | |
| override void | SetParameter (int emitter, int parameter, float value) |
| Set the value of a parameter of an emitor in the particle. | |
| override void | GetParameter (int emitter, int parameter, out float value) |
| Get the value of a parameter of an emitor in the particle. | |
| override float | GetParameterEx (int emitter, int parameter) |
| Get the value of a parameter of an emitor in the particle. | |
| override void | ScaleParticleParamFromOriginal (int parameter_id, float coef) |
| Scales the given parameter on all emitors relatively to their ORIGINAL value. | |
| override void | ScaleParticleParam (int parameter_id, float coef) |
| Scales the given parameter on all emitors relatively to their CURRENT value. | |
| override void | IncrementParticleParamFromOriginal (int parameter_id, float value) |
| Increments the value of the given parameter relatively from the ORIGINAL value. | |
| override void | IncrementParticleParam (int parameter_id, float value) |
| Increments the value of the given parameter relatively from the CURRENT value. | |
Static Protected Member Functions | |
Create a particle (static) | |
Helper static methods to create/attach/play a ParticleSource on one line | |
| static ParticleSource | CreateParticle (int id, vector pos, bool playOnCreation=false, Object parent=null, vector ori=vector.Zero, bool forceWorldRotation=false, Class owner=null) |
| Create function. | |
| static ParticleSource | CreateParticleEx (int id, vector pos, int flags=ParticlePropertiesFlags.NONE, Object parent=null, vector ori=vector.Zero, Class owner=null) |
| Master create function. | |
| static override Particle | CreateOnObject (int particle_id, Object parent_obj, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_world_rotation=false) |
| Creates a particle emitter and attaches it on the given object. | |
| static override Particle | Create (int particle_id, Object parent_obj, vector local_pos="0 0 0", vector local_ori="0 0 0") |
| Legacy function for backwards compatibility. | |
| static override Particle | CreateInWorld (int particle_id, vector global_pos, vector global_ori="0 0 0", bool force_world_rotation=false) |
| Creates a particle emitter on the given position. | |
| static override ParticleSource | Create (int particle_id, vector global_pos, vector global_ori="0 0 0") |
| Legacy function for backwards compatibility with 1.01 and below. | |
Static play on creation | |
You can use the following Play(...) functions to create and activate a particle in 1 line of your script. | |
| static override Particle | PlayOnObject (int particle_id, Object parent_obj, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_world_rotation=false) |
| Creates a particle emitter, attaches it on the given object and activates it. | |
| static override Particle | Play (int particle_id, Object parent_obj, vector local_pos="0 0 0", vector local_ori="0 0 0") |
| Legacy function for backwards compatibility with 1.01 and below. | |
| static override Particle | PlayInWorld (int particle_id, vector global_pos) |
| Creates a particle emitter on the given position and activates it. | |
| static override Particle | Play (int particle_id, vector global_pos) |
| Legacy function for backwards compatibility with 1.01 and below. | |
Wiggle API | |
Settings to make the Particle wiggle | |
| override void | SetWiggle (float random_angle, float random_interval) |
| Makes the particle change direction by random_angle every random_interval seconds. | |
| override void | StopWiggle () |
| Stops randomized wiggle. | |
Misc Particle specific helpers | |
Functionality specific for Particle, so we empty them here | |
| void | EOnFrame (IEntity other, float timeSlice) |
| Empty. | |
Entity which has the particle instance as an ObjectComponent.
Definition at line 123 of file particlesource.c.
|
protected |
Attaches this particle onto some object. If null value is provided then the particle will be detached from the current parent.
| parent | Object Parent onto which this particle will be attached |
| local_pos | vector Attachment position local to the parent (optional) |
| local_ori | vector Orientation local to the parent (Pitch, Yawn, Roll in degrees) (Optional) |
| force_rotation_to_world | bool Force rotation to be in WS (Optional) |
Definition at line 783 of file particlesource.c.
|
staticprotected |
Legacy function for backwards compatibility.
Definition at line 249 of file particlesource.c.
|
staticprotected |
Legacy function for backwards compatibility with 1.01 and below.
Definition at line 270 of file particlesource.c.
|
staticprotected |
Creates a particle emitter on the given position.
| particle_id | int Particle ID registered in ParticleList |
| global_pos | Vector Position where the particel will be created |
| global_ori | vector Orientation (Pitch, Yawn, Roll in degrees) (Optional) |
| force_world_rotation | bool Has absolutely no effect here as there is no parent |
Particle Created particle instance Definition at line 262 of file particlesource.c.
|
staticprotected |
Creates a particle emitter and attaches it on the given object.
| particle_id | int Particle ID registered in ParticleList |
| parent_obj | Object Instance on which this particle will be attached |
| local_pos | vector Attachment position local to the parent (Optional) |
| local_ori | vector Orientation local to the parent (Pitch, Yaw, Roll in degrees) (Optional) |
| force_world_rotation | bool Forces particle's orientation to rotate relative to the world and not with the object (Optional) |
Particle Created particle instance Definition at line 236 of file particlesource.c.
|
staticprotected |
Create function.
| id | int Particle ID registered in ParticleList |
| pos | vector Position of ParticleSource in LS (WS when no parent) |
| playOnCreation | bool Whether to play immediately after creation (Optional) |
| parent | Object Parent Object which will child the ParticleSource (Optional) |
| ori | vector Orientation of ParticleSource in LS (WS when no parent) (Pitch, Yaw, Roll in degrees) (Optional) |
| forceWorldRotation | bool Forces orientation to rotate relative to the world and not with the parent (Optional) |
| owner | Class The owning instance for this particle (Optional) |
ParticleSource Created particle instance when successful Definition at line 178 of file particlesource.c.
|
staticprotected |
Master create function.
| id | int Particle ID registered in ParticleList |
| pos | vector Position of ParticleSource in LS (WS when no parent) |
| flags | int See ParticlePropertiesFlags (Optional) |
| parent | Object Parent Object which will child the ParticleSource (Optional) |
| ori | vector Orientation of ParticleSource in LS (WS when no parent) (Pitch, Yaw, Roll in degrees) (Optional) |
| owner | Class The owning instance for this particle (Optional) |
ParticleSource Created particle instance when successful Definition at line 205 of file particlesource.c.
|
protected |
Disables the particle automatically cleaning up itself when ending or stopping.
Definition at line 151 of file particlesource.c.
Empty.
Definition at line 1022 of file particlesource.c.
|
protected |
Get the value of a parameter of an emitor in the particle.
| emitter | int The emitor to get the value from |
| parameter | int The parameter to get the value from (enum EmitorParam) |
| value | float The value |
Definition at line 830 of file particlesource.c.
Get the value of a parameter of an emitor in the particle.
| emitter | int The emitor to get the value from |
| parameter | int The parameter to get the value from (enum EmitorParam) |
float The value Definition at line 841 of file particlesource.c.
|
protected |
Gets the currently set ParticleAutoDestroyFlags flags set on this ParticleSource.
int Currently set ParticleAutoDestroyFlags flags set on this ParticleSource Increments the value of the given parameter relatively from the CURRENT value.
| parameter_id | int The parameter to adjust (enum EmitorParam) |
| value | float The value to sum |
Definition at line 903 of file particlesource.c.
|
protected |
Increments the value of the given parameter relatively from the ORIGINAL value.
| parameter_id | int The parameter to adjust (enum EmitorParam) |
| value | float The value to sum |
Definition at line 886 of file particlesource.c.
|
protected |
Event when the particle receives a parent.
Definition at line 722 of file particlesource.c.
|
protected |
Event when the particle stops.
Definition at line 755 of file particlesource.c.
|
protected |
Event when the particle is orphaned.
Definition at line 732 of file particlesource.c.
|
protected |
Empty - Only needed for Particle.
Definition at line 137 of file particlesource.c.
|
staticprotected |
Legacy function for backwards compatibility with 1.01 and below.
Definition at line 301 of file particlesource.c.
|
staticprotected |
Legacy function for backwards compatibility with 1.01 and below.
Definition at line 320 of file particlesource.c.
|
staticprotected |
Creates a particle emitter on the given position and activates it.
| particle_id | int Particle ID registered in ParticleList |
| global_pos | Vector Position where the particel will be created |
Particle Created particle instance Definition at line 312 of file particlesource.c.
|
staticprotected |
Creates a particle emitter, attaches it on the given object and activates it.
| particle_id | int Particle ID registered in ParticleList |
| parent_obj | Object Instance on which this particle will be attached |
| local_pos | vector Attachment position local to the parent (Optional) |
| local_ori | vector Orientation local to the parent (Pitch, Yaw, Roll in degrees) (Optional) |
| force_world_rotation | bool Forces particle's orientation to rotate relative to the world and not with the object (Optional) |
Particle Created particle instance Definition at line 293 of file particlesource.c.
Scales the given parameter on all emitors relatively to their CURRENT value.
| parameter_id | int The parameter to adjust (enum EmitorParam) |
| coef | float The multiplier to apply |
Definition at line 869 of file particlesource.c.
|
protected |
Scales the given parameter on all emitors relatively to their ORIGINAL value.
| parameter_id | int The parameter to adjust (enum EmitorParam) |
| coef | float The multiplier to apply |
Definition at line 853 of file particlesource.c.
Set the value of a parameter of an emitor in the particle.
| emitter | int The emitter to apply the new value to, -1 for all emitter |
| parameter | int The parameter to apply the new value to (enum EmitorParam) |
| value | float The value to apply |
Definition at line 819 of file particlesource.c.
|
protected |
Enables the particle to automatically clean up itself when ending or stopping.
| flags | ParticleAutoDestroyFlags Flags enabling when the particle should be auto destroyed |
Set the value of a parameter of all emitors in the particle.
| parameter | int The parameter to apply the new value to (enum EmitorParam) |
| value | float The value to apply |
Definition at line 808 of file particlesource.c.
Makes the particle change direction by random_angle every random_interval seconds.
| random_angle | float Will be the range [-random_angle, random_angle[ to wiggle between |
| random_interval | float Will be the time range [0, random_interval] to wiggle next time |
Definition at line 929 of file particlesource.c.
|
protected |
Stops randomized wiggle.
Definition at line 960 of file particlesource.c.