DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
Класс Particle

Legacy way of using particles in the game. Подробнее...

+ Граф наследования:Particle:

Защищенные члены

Playback

Methods regarding playing/stopping of particle

override void PlayParticle (int particle_id=-1)
 Method to tell the particle to start playing.
 
override bool PlayParticleEx (int particle_id=-1, int flags=0)
 Method to tell the particle to start playing.
 
void Play (int particle_id=-1)
 Legacy function for backwards compatibility with 1.01 and below.
 
override bool StopParticle (int flags=0)
 Method to tell the particle to stop playing.
 
void Stop ()
 Legacy function for backwards compatibility with 1.14 and below.
 
Properties and state

Obtain information or set properties regarding the state of the Particle

void SetSource (int particle_id)
 Sets particle id.
 
int GetParticleID ()
 Gets particle id.
 
Object GetDirectParticleEffect ()
 Returns direct particle effect entity which is usually handled by this class 'Particle' if there is one.
 
Object GetParticleParent ()
 Returns the parent of this Particle if there is one.
 
bool HasActiveParticle ()
 Returns if there is any particle active.
 
int GetParticleCount ()
 Returns the total count of active particles in all emitors.
 
bool IsRepeat ()
 Returns whether there is a repeating particle.
 
float GetMaxLifetime ()
 Returns the approx. max lifetime.
 

Защищенные статические члены

Create a particle (static)

You can create a particle either at some position, or create it as a child on some object.

static 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 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 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 Particle 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 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 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 Particle PlayInWorld (int particle_id, vector global_pos)
 Creates a particle emitter on the given position and activates it.
 
static Particle Play (int particle_id, vector global_pos)
 Legacy function for backwards compatibility with 1.01 and below.
 

Закрытые члены

Misc

Various helpers

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

void SetParticleParam (int parameter_id, float value)
 Set the value of a parameter of all emitors in the particle.
 
void SetParameter (int emitter, int parameter, float value)
 Set the value of a parameter of an emitor in the particle.
 
void GetParameter (int emitter, int parameter, out float value)
 Get the value of a parameter of an emitor in the particle.
 
float GetParameterEx (int emitter, int parameter)
 Get the value of a parameter of an emitor in the particle.
 
float GetParameterOriginal (int emitter, int parameter)
 
void ScaleParticleParamFromOriginal (int parameter_id, float coef)
 Scales the given parameter on all emitors relatively to their ORIGINAL value.
 
void ScaleParticleParam (int parameter_id, float coef)
 Scales the given parameter on all emitors relatively to their CURRENT value.
 
void IncrementParticleParamFromOriginal (int parameter_id, float value)
 Increments the value of the given parameter relatively from the ORIGINAL value.
 
void IncrementParticleParam (int parameter_id, float value)
 Increments the value of the given parameter relatively from the CURRENT value.
 

Generic data

Generic data for the Particle

int m_ParticleID
 ID from ParticleList if assigned.
 
float m_Lifetime
 Approx. remaining lifetime of particle.
 
bool m_IsRepeat
 Whether this particle repeats.
 
bool m_MarkedForDeletion
 Whether this particle is queued for deletion.
 

Wiggle API

Settings to make the Particle wiggle

Object m_ParentObject
 Parent Object the Particle is child of.
 
Object m_ParticleEffect
 The child object which contains the actual particle.
 
int m_PreviousFrame
 DEPRECATED.
 
bool m_WiggleProcessing
 Used for Wiggle API, to signal that wiggle API is currently doing work.
 
bool m_ForceOrientationRelativeToWorld
 Used for Wiggle API, to restore after unparenting.
 
vector m_DefaultOri
 Used for Wiggle API, to restore after unparenting.
 
vector m_DefaultPos
 Used for Wiggle API, to restore after unparenting.
 
vector m_DefaultWorldOri
 Used for Wiggle API, to restore after unparenting.
 
vector m_DefaultWorldPos
 Used for Wiggle API, to restore after unparenting.
 
float m_MaxOriWiggle
 Used for Wiggle API, Wiggle room [-m_MaxOriWiggle, m_MaxOriWiggle].
 
float m_MaxOriInterval
 Used for Wiggle API, Interval for wiggling [0, m_MaxOriInterval[.
 
ref Timer m_RandomizeOri
 Used for Wiggle API, calls the Wiggle functionality.
 
vector m_GlobalPosPreviousFrame
 DEPRECATED.
 
const int MAX_EMITORS = 30
 DEPRECATED.
 
void Particle ()
 ctor
 
bool IsWiggling ()
 Checks if particle is currently wiggling.
 
void SetWiggle (float random_angle, float random_interval)
 Makes the particle change direction by random_angle every random_interval seconds.
 
void StopWiggle ()
 Stops randomized wiggle.
 
void RandomizeOrientation ()
 Randomizes a new orientation and applies it.
 
void ParticleInit ()
 Purely here so that it can be emptied in ParticleSource.
 
vector RandWiggleVector ()
 Helper to get a randomized wiggle vector.
 
float RandWiggleFloat ()
 Helper to get a randomized wiggle float value.
 

Misc Particle specific helpers

Functionality specific for Particle

void CreateParticleEffect ()
 Creates ParticleEffect child, called from UpdateState.
 
void DestroyParticleEffect ()
 Destroys ParticleEffect child, called from UpdateState.
 
override void EOnFrame (IEntity other, float timeSlice)
 OnFrame update event decrementing the stored approx. lifetime and checking for deletion.
 
void OnCheckAutoDelete ()
 Creates ParticleEffect child, called from UpdateState.
 
void OnToDelete ()
 Called before deletion from OnCheckAutoDelete.
 
void UpdateState ()
 Creates/Destroys ParticleEffect child according to current state.
 

Подробное описание

Legacy way of using particles in the game.

Заметки
They work okay when just needing to play a particle once every once in a while But are extremely wasteful when it comes to playing multiple Particles at the same time

См. определение в файле Particle.c строка 6