Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
particlebase.c File Reference

Go to the source code of this file.

Data Structures

class  ParticleEvents
 Invokers for ParticleBase events, called from events. More...

Functions

override bool IsParticle ()
 Have script recognize this as a Particle without casting.
void ParticleBase ()
 ctor
Playback

Methods regarding playing/stopping of particle

ParticleEvents GetEvents ()
 Get the events.
bool IsParticlePlaying ()
 Ask if the particle is still playing.
void PlayParticle (int particle_id=-1)
 Method to tell the particle to start playing.
bool PlayParticleEx (int particle_id=-1, int flags=0)
 Method to tell the particle to start playing.
bool ResetParticle ()
 Method to tell the particle to reset.
bool RestartParticle ()
 Method to tell the particle to restart (reset + play).
bool StopParticle (int flags=0)
 Method to tell the particle to stop playing.
Events

ParticleBase events For ParticleSource, these are handed on C++ side For more information, read ParticleEvents

void OnParticleEnd ()
 Event when the particle ends.
void OnParticleParented (IEntity parent)
 Event when the particle receives a parent.
void OnParticleReset ()
 Event when the particle is restarted.
void OnParticleStart ()
 Event when the particle starts.
void OnParticleStop ()
 Event when the particle stops.
void OnParticleUnParented (IEntity parent)
 Event when the particle is orphaned.

Variables

ref ParticleEvents m_EventInvokers
 Event invokers.
class ParticleEvents m_IsPlaying
 Engine base class with internal functionality.

Function Documentation

◆ GetEvents()

ParticleEvents GetEvents ( )
protected

Get the events.

Returns
ParticleEvents If there is any events set, this will return them so that additional functionality can be bound to them

Definition at line 162 of file particlebase.c.

References m_EventInvokers.

Referenced by OnAllocation(), OnAllocationEnd(), OnEnd(), OnHeaderLoad(), OnLoad(), OnParticleEnd(), OnParticleParented(), OnParticleReset(), OnParticleStart(), OnParticleStop(), OnParticleUnParented(), OnPlay(), and OnStop().

◆ IsParticle()

override bool IsParticle ( )
protected

Have script recognize this as a Particle without casting.

Definition at line 79 of file particlebase.c.

◆ IsParticlePlaying()

bool IsParticlePlaying ( )
protected

Ask if the particle is still playing.

Returns
bool Whether the particle is playing

Definition at line 148 of file particlebase.c.

References ErrorEx.

◆ OnParticleEnd()

void OnParticleEnd ( )
protected

Event when the particle ends.

Note
Looping particles will never end

Definition at line 206 of file particlebase.c.

References ParticleEvents::Event_OnParticleEnd, GetEvents(), and ScriptInvoker::Invoke().

Referenced by Particle::OnCheckAutoDelete().

◆ OnParticleParented()

void OnParticleParented ( IEntity parent)
protected

Event when the particle receives a parent.

Definition at line 214 of file particlebase.c.

References ParticleEvents::Event_OnParticleParented, GetEvents(), and ScriptInvoker::Invoke().

◆ OnParticleReset()

void OnParticleReset ( )
protected

Event when the particle is restarted.

Definition at line 197 of file particlebase.c.

References ParticleEvents::Event_OnParticleReset, GetEvents(), and ScriptInvoker::Invoke().

◆ OnParticleStart()

void OnParticleStart ( )
protected

Event when the particle starts.

Definition at line 179 of file particlebase.c.

References ParticleEvents::Event_OnParticleStart, GetEvents(), ScriptInvoker::Invoke(), and m_IsPlaying.

Referenced by Particle::PlayParticleEx().

◆ OnParticleStop()

void OnParticleStop ( )
protected

Event when the particle stops.

Definition at line 188 of file particlebase.c.

References ParticleEvents::Event_OnParticleStop, GetEvents(), ScriptInvoker::Invoke(), and m_IsPlaying.

Referenced by Particle::OnCheckAutoDelete(), and Particle::StopParticle().

◆ OnParticleUnParented()

void OnParticleUnParented ( IEntity parent)
protected

Event when the particle is orphaned.

Definition at line 222 of file particlebase.c.

References ParticleEvents::Event_OnParticleUnParented, GetEvents(), and ScriptInvoker::Invoke().

◆ ParticleBase()

void ParticleBase ( )
protected

ctor

Definition at line 71 of file particlebase.c.

References m_EventInvokers.

◆ PlayParticle()

◆ PlayParticleEx()

bool PlayParticleEx ( int particle_id = -1,
int flags = 0 )
protected

Method to tell the particle to start playing.

Parameters
particle_idint Particle ID registered in ParticleList to start playing
flagsint Flags to pass to the playing
Returns
bool Whether the particle successfully started

Definition at line 107 of file particlebase.c.

References ErrorEx, and particle_id.

◆ ResetParticle()

bool ResetParticle ( )
protected

Method to tell the particle to reset.

Returns
bool Whether the particle successfully reset

Definition at line 128 of file particlebase.c.

References ErrorEx.

◆ RestartParticle()

bool RestartParticle ( )
protected

Method to tell the particle to restart (reset + play).

Returns
bool Whether the particle successfully restarted

Definition at line 138 of file particlebase.c.

References ErrorEx.

◆ StopParticle()

bool StopParticle ( int flags = 0)
protected

Method to tell the particle to stop playing.

Parameters
flagsint Flags to pass to the stopping
Returns
bool Whether the particle successfully stopped

Definition at line 118 of file particlebase.c.

References ErrorEx.

Referenced by ParticleFireEndStop(), ParticleFireStartStop(), ParticleNormalFireStop(), ParticleNormalSmokeStop(), ParticleSmallFireStop(), ParticleSmallSmokeStop(), ParticleSteamEndStop(), ParticleSteamExtinguishingStop(), ParticleWetNoIgniteStop(), and StopAllParticlesAndSounds().

Variable Documentation

◆ m_EventInvokers

ref ParticleEvents m_EventInvokers
protected

Event invokers.

Definition at line 66 of file particlebase.c.

Referenced by GetEvents(), and ParticleBase().

◆ m_IsPlaying

class ParticleEvents m_IsPlaying

Engine base class with internal functionality.

Note
Is NOT intended for direct creation As this does not have an actual particle Use either Particle or ParticleSource Whether the particle is currently playing