Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
EffectParticle Class Reference

Wrapper class for managing particles through SEffectManager. More...

Inheritance diagram for EffectParticle:
BleedingSourceEffect BloodSplatter EffBreathVapourHeavy EffBreathVapourLight EffBreathVapourMedium EffBulletImpactBase EffBulletImpactTest EffGeneratorSmoke EffSwarmingFlies EffVehicleSmoke EffVomit EffVomitBlood EffWheelSmoke EffectBoatWaterBase LandmineExplosion MenuCarEngineSmoke MenuEvaporation

Protected Member Functions

EffectType

Information about what type of effect the Effect is, without the need for casting

override EffectType GetEffectType ()
 Get what type of effect the Effect is.
override bool IsParticle ()
 Check whether the Effect is EffectParticle without casting.
Main particle

Set or get the main particle which this Effect will manage

void SetParticle (Particle p)
 Sets the main particle which this Effect will manage.
Particle GetParticle ()
 Gets the main particle which this Effect is managing.
Playback

Methods to Play/Stop Effect Generally, SEffectManager.Play methods are used instead of Start

override void Start ()
 Plays all elements this effect consists of.
override void Stop ()
 Stops all elements this effect consists of.
Attach

Helper methods for attaching to prent

void AttachTo (Object obj, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_rotation_to_world=false)
 Read Particle.AddAsChild.
void ReAttach ()
 Helper method to attach to parent using stored settings.
void AddAsChild (Object obj, vector local_pos, vector local_ori, bool force_rotation_to_world)
 Helper method to attach to parent.
Events

Various events that can be overriden for custom behaviour

void Event_OnPlayStart ()
 Event which just simply exists (DEPRECATED).
void Event_OnPlayStarted ()
 Event which just simply exists (DEPRECATED).
Generic API

Setters and getters for generic data and properties

void SetParticleID (int id)
 Sets the id of the particle to be used.
int GetParticleID ()
 Gets the id of the particle to be used.
void SetCurrentParticleID (int id)
 Sets the id of the particle to be used.
int GetCurrentParticleID ()
 Gets the current id of the managed Particle.
override void SetCurrentParent (Object parent_obj, bool updateCached=true)
 Set current parent of the managed Particle.
override Object GetCurrentParent ()
 Get the current parent of the managed Particle.
override void SetCurrentPosition (vector pos, bool updateCached=true)
 Set the current world position of the managed Particle.
override vector GetCurrentPosition ()
 Get the current world position of the managed Particle.
override void SetCurrentLocalPosition (vector pos, bool updateCached=true)
 Set the current local position of the managed Particle.
override vector GetCurrentLocalPosition ()
 Get the current local position of the managed Particle.
void SetOrientation (vector ori)
 Set orientation of the EffectParticle.
vector GetOrientation ()
 Get the orientation of the EffectParticle.
void SetCurrentOrientation (vector ori, bool updateCached=true)
 Set the current orientation of the managed Particle.
vector GetCurrentOrientation ()
 Get the current orientation of the managed Particle.
void ForceParticleRotationRelativeToWorld (bool state)
 Set orientation setting to be used by the effect when the Effect starts.
bool IsParticleRotationRelativeToWorld ()
 Get the orientation setting to be used by the effect when the Effect starts.
bool IsParticleCurrentRotationRelativeToWorld ()
 Get the current orientation setting to be used by the managed Particle.

Protected Attributes

Particle m_ParticleObj
 The main Particle effect that this Effect wrapper manages.
Generic data

Generic data for the particle

int m_ParticleID
 The ID in the ParticleList to create Particle from.
vector m_Orientation
 Orientation set by SetOrientation.
bool m_ForceRotationRelativeToWorld
 Orientation setting to be used by the effect when the Effect starts.

DEPRECATED

Methods which exist for backwards compatibility and are no longer in use or have never been in use

vector m_ParticleOrientation
Object m_Object
void EffectParticle ()
 ctor
void ~EffectParticle ()
 dtor
override void InitEffect ()
 init
override string GetDebugName ()
 Override when getting debug information.
override void ValidateStart ()
 Validation whether an effect truly started playing or if the Effect should stop as none is present.
void CheckLifeSpan ()
 Was never called and probably should never be called.
void SetDecalOwner (Object o)

Detailed Description

Wrapper class for managing particles through SEffectManager.

Definition at line 4 of file effectparticle.c.

Constructor & Destructor Documentation

◆ EffectParticle()

void EffectParticle ( )
inlineprotected

ctor

Definition at line 34 of file effectparticle.c.

Referenced by BleedingSourceEffectLight(), and Hit_MeatBones::BloodSplatGround().

◆ ~EffectParticle()

void ~EffectParticle ( )
inlineprotected

dtor

Definition at line 42 of file effectparticle.c.

Member Function Documentation

◆ AddAsChild()

void AddAsChild ( Object obj,
vector local_pos,
vector local_ori,
bool force_rotation_to_world )
inlineprotected

Helper method to attach to parent.

Definition at line 251 of file effectparticle.c.

References Particle::AddAsChild(), and GetParticle().

Referenced by AttachTo(), and ReAttach().

◆ AttachTo()

void AttachTo ( Object obj,
vector local_pos = "0 0 0",
vector local_ori = "0 0 0",
bool force_rotation_to_world = false )
inlineprotected

◆ CheckLifeSpan()

void CheckLifeSpan ( )
inlineprotected

Was never called and probably should never be called.

Warning
Emptied the functionality as it is relatively unsafe...

Definition at line 550 of file effectparticle.c.

◆ Event_OnPlayStart()

void Event_OnPlayStart ( )
inlineprotected

Event which just simply exists (DEPRECATED).

Warning
Never called or used
Note
Use Event_OnStarted instead

Definition at line 274 of file effectparticle.c.

◆ Event_OnPlayStarted()

void Event_OnPlayStarted ( )
inlineprotected

Event which just simply exists (DEPRECATED).

Warning
Never called or used
Note
Use Event_OnStarted instead

Definition at line 284 of file effectparticle.c.

◆ ForceParticleRotationRelativeToWorld()

void ForceParticleRotationRelativeToWorld ( bool state)
inlineprotected

Set orientation setting to be used by the effect when the Effect starts.

Warning
Only caches it into a variable to be used by Start, does not live update when called afterwards
Note
There is no way to update this immediately
Parameters
statebool Whether to keep WS orientation when attaching it to parent

Definition at line 503 of file effectparticle.c.

References m_ForceRotationRelativeToWorld.

Referenced by AttachTo(), and SEffectManager::PlayOnObject().

◆ GetCurrentLocalPosition()

override vector GetCurrentLocalPosition ( )
inlineprotected

Get the current local position of the managed Particle.

Returns
vector The current local position of the managed Particle

Definition at line 431 of file effectparticle.c.

References GetParent(), and GetParticle().

◆ GetCurrentOrientation()

vector GetCurrentOrientation ( )
inlineprotected

Get the current orientation of the managed Particle.

Returns
vector The current orientation of the managed Particle

Definition at line 487 of file effectparticle.c.

References GetParticle(), and vector::Zero.

◆ GetCurrentParent()

override Object GetCurrentParent ( )
inlineprotected

Get the current parent of the managed Particle.

Returns
Object The currrent parent of the Particle

Definition at line 367 of file effectparticle.c.

References GetParticle().

◆ GetCurrentParticleID()

int GetCurrentParticleID ( )
inlineprotected

Gets the current id of the managed Particle.

Returns
int Particle ID registered in ParticleList

Definition at line 338 of file effectparticle.c.

References GetParticle(), Particle::GetParticleID(), and ParticleList::INVALID.

◆ GetCurrentPosition()

override vector GetCurrentPosition ( )
inlineprotected

Get the current world position of the managed Particle.

Returns
vector The current world position of the managed Particle

Definition at line 396 of file effectparticle.c.

References GetParticle().

◆ GetDebugName()

override string GetDebugName ( )
inlineprotected

Override when getting debug information.

Definition at line 67 of file effectparticle.c.

References string::Format(), GetParticle(), and m_ParticleID.

◆ GetEffectType()

override EffectType GetEffectType ( )
inlineprotected

Get what type of effect the Effect is.

Returns
EffectType What type of effect the Effect is

Definition at line 107 of file effectparticle.c.

◆ GetOrientation()

vector GetOrientation ( )
inlineprotected

Get the orientation of the EffectParticle.

Warning
Only gets the cached variable, for immediate effect use GetCurrent variant
Returns
vector The orientation of EffectParticle

Definition at line 463 of file effectparticle.c.

References m_Orientation.

Referenced by Start().

◆ GetParticle()

◆ GetParticleID()

int GetParticleID ( )
inlineprotected

Gets the id of the particle to be used.

Warning
Only gets the cached variable, for immediate effect use GetCurrent variant
Returns
int Particle ID registered in ParticleList

Definition at line 313 of file effectparticle.c.

References m_ParticleID.

◆ InitEffect()

override void InitEffect ( )
inlineprotected

init

Definition at line 50 of file effectparticle.c.

References Event_OnEffectEnded, and Event_OnStopped.

◆ IsParticle()

override bool IsParticle ( )
inlineprotected

Check whether the Effect is EffectParticle without casting.

Returns
bool Whether the Effect is EffectParticle

Definition at line 116 of file effectparticle.c.

◆ IsParticleCurrentRotationRelativeToWorld()

bool IsParticleCurrentRotationRelativeToWorld ( )
inlineprotected

Get the current orientation setting to be used by the managed Particle.

Returns
bool Whether the managed Particle is only updating position from parent

Definition at line 527 of file effectparticle.c.

References GetParticle().

◆ IsParticleRotationRelativeToWorld()

bool IsParticleRotationRelativeToWorld ( )
inlineprotected

Get the orientation setting to be used by the effect when the Effect starts.

Warning
Only gets the cached variable, for immediate effect use IsParticleCurrentRotationRelativeToWorld
Returns
bool Whether to keep WS orientation when attaching it to parent

Definition at line 513 of file effectparticle.c.

References GetParticle(), and m_ForceRotationRelativeToWorld.

Referenced by ReAttach(), and Start().

◆ ReAttach()

void ReAttach ( )
inlineprotected

Helper method to attach to parent using stored settings.

Definition at line 242 of file effectparticle.c.

References AddAsChild(), GetAttachedLocalOri(), GetLocalPosition(), GetParent(), and IsParticleRotationRelativeToWorld().

Referenced by SetCurrentLocalPosition(), and SetCurrentParent().

◆ SetCurrentLocalPosition()

override void SetCurrentLocalPosition ( vector pos,
bool updateCached = true )
inlineprotected

Set the current local position of the managed Particle.

Parameters
posvector The current local position for the managed Particle
updateCachedbool Whether to update the cached variable

Definition at line 411 of file effectparticle.c.

References GetParent(), GetParticle(), and ReAttach().

Referenced by Car::EOnPostSimulate(), and EffectBoatWaterBase::UpdatePosToSeaLevel().

◆ SetCurrentOrientation()

void SetCurrentOrientation ( vector ori,
bool updateCached = true )
inlineprotected

Set the current orientation of the managed Particle.

Parameters
orivector Orientation in degrees (yaw, pitch, roll)

Definition at line 472 of file effectparticle.c.

References GetParticle(), and SetOrientation().

◆ SetCurrentParent()

override void SetCurrentParent ( Object parent_obj,
bool updateCached = true )
inlineprotected

Set current parent of the managed Particle.

Parameters
parent_objObject The parent for the Particle
updateCachedbool Whether to update the cached variable

Definition at line 356 of file effectparticle.c.

References ReAttach().

◆ SetCurrentParticleID()

void SetCurrentParticleID ( int id)
inlineprotected

Sets the id of the particle to be used.

Note
Particle will not update immediately, but ParticleSource will
Parameters
idint Particle ID registered in ParticleList

Definition at line 323 of file effectparticle.c.

References GetParticle(), m_ParticleID, and Particle::SetSource().

◆ SetCurrentPosition()

override void SetCurrentPosition ( vector pos,
bool updateCached = true )
inlineprotected

Set the current world position of the managed Particle.

Parameters
posvector The current world position for the Particle
updateCachedbool Whether to update the cached variable

Definition at line 382 of file effectparticle.c.

References GetParticle().

◆ SetDecalOwner()

void SetDecalOwner ( Object o)
inlineprotected

Definition at line 562 of file effectparticle.c.

References m_Object.

Referenced by ManBase::OnParticleEvent().

◆ SetOrientation()

void SetOrientation ( vector ori)
inlineprotected

Set orientation of the EffectParticle.

Warning
Only sets the cached variable, for immediate effect use SetCurrent variant
Parameters
orivector Orientation in degrees (yaw, pitch, roll)

Definition at line 453 of file effectparticle.c.

References m_Orientation.

Referenced by SetCurrentOrientation().

◆ SetParticle()

void SetParticle ( Particle p)
inlineprotected

Sets the main particle which this Effect will manage.

Parameters
pParticle Main particle which this Effect will manage

Definition at line 134 of file effectparticle.c.

References Event_OnEffectEnded, Event_OnEffectStarted, ParticleEvents::Event_OnParticleStart, ParticleEvents::Event_OnParticleStop, ScriptInvoker::Insert(), m_ParticleObj, and ScriptInvoker::Remove().

Referenced by EffBulletImpactBase::Event_OnStarted(), Start(), and Stop().

◆ SetParticleID()

◆ Start()

◆ Stop()

override void Stop ( )
inlineprotected

◆ ValidateStart()

override void ValidateStart ( )
inlineprotected

Validation whether an effect truly started playing or if the Effect should stop as none is present.

Note
Override this when inheriting to create own validation check
Is called from Event_OnStarted invoker after Event_OnStarted has been performed

Definition at line 87 of file effectparticle.c.

References GetParticle(), and Stop().

Field Documentation

◆ m_ForceRotationRelativeToWorld

bool m_ForceRotationRelativeToWorld
protected

Orientation setting to be used by the effect when the Effect starts.

Definition at line 18 of file effectparticle.c.

Referenced by ForceParticleRotationRelativeToWorld(), and IsParticleRotationRelativeToWorld().

◆ m_Object

Object m_Object
protected

Definition at line 26 of file effectparticle.c.

Referenced by SetDecalOwner().

◆ m_Orientation

vector m_Orientation
protected

Orientation set by SetOrientation.

Definition at line 16 of file effectparticle.c.

Referenced by GetOrientation(), and SetOrientation().

◆ m_ParticleID

int m_ParticleID
protected

The ID in the ParticleList to create Particle from.

Definition at line 14 of file effectparticle.c.

Referenced by GetDebugName(), GetParticleID(), SetCurrentParticleID(), SetParticleID(), EffWheelSmoke::SetSurface(), and Start().

◆ m_ParticleObj

Particle m_ParticleObj
protected

The main Particle effect that this Effect wrapper manages.

Definition at line 7 of file effectparticle.c.

Referenced by GetParticle(), and SetParticle().

◆ m_ParticleOrientation

vector m_ParticleOrientation
protected

Definition at line 25 of file effectparticle.c.


The documentation for this class was generated from the following file: