DIFF

class EffectSource

Effect Managed

All members, including inherited

Constructors 2

void Effect()

ctor

References ErrorEx(), InitEffect(), CGame.IsDedicatedServer()
Show 1 more, m_IsPlaying
void ~Effect()

dtor

Members 14

ref ScriptInvoker Event_OnStarted = new ScriptInvoker()

\name Event invokers ScriptInvonkers for certain events

ref ScriptInvoker Event_OnStopped = new ScriptInvoker()
ref ScriptInvoker Event_OnEffectStarted = new ScriptInvoker()
protected bool m_IsAutodestroy

Whether the Effect cleans up after itself when stopped

protected bool m_IsPendingDeletion

Whether the Destroy process has already been called

Referenced by Destroy(), and IsPendingDeletion()
protected bool m_IsPlaying

Whether the Effect is currently playing

protected Object m_ParentObject

Cached parent

protected int m_PivotIndex = -1

Cached parent pivot id

protected vector m_Position

Cached world position

Referenced by GetPosition(), and SetPosition()
protected int m_ID

ID of effect, given by SEffectManager when registered (automatically done when playing through it)

Referenced by GetID(), and SetID()
protected bool m_IsRegistered

Whether the effect is registered in SEffectManager

protected vector m_LocalPos

Cached local pos

protected vector m_LocalOri

Local orientation set by SetAttachedLocalOri, only used by EffectParticle

Methods 45

EffectType GetEffectType()

Get what type of effect the Effect is

Returns: EffectType What type of effect the Effect is

bool IsSound()

Check whether the Effect is EffectSound without casting

Returns: bool Whether the Effect is EffectSound

bool IsParticle()

Check whether the Effect is EffectParticle without casting

Returns: bool Whether the Effect is EffectParticle

void Start()

Plays all elements this effects consists of

NoteIs called by SEffectManager.Play methods
void ValidateStart()

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

NoteOverride this when inheriting to create own validation check
NoteIs called from Event_OnStarted invoker after Event_OnStarted has been performed
void Stop()

Stops all elements this effect consists of

NoteAlternatively use SEffectManager.Stop( effect_id )
protected void Destroy()

Cleans up the Effect, including unregistering if needed

NoteWill stop the Effect and queue up the deletion in the callqueue
NoteIs intended for usage from within the Effect itself, use SEffectManager.DestroyEffect when working from a pointer
Referenced by Event_OnEffectEnded()
void SetAutodestroy(bool auto_destroy)

Sets whether Effect automatically cleans up when it stops

auto_destroy
bool Whether Effect automatically cleans up when it stops
NoteThis means that it will be unregistered from SEffectManager as well
References m_IsAutodestroy
bool IsAutodestroy()

Get whether Effect automatically cleans up when it stops

Returns: bool Whether Effect automatically cleans up when it stops

References m_IsAutodestroy
Referenced by Event_OnEffectEnded()
bool IsPendingDeletion()

Get whether the Effect is queued up for being cleaned up

Returns: bool Whether the Effect is queued up for being cleaned up

bool CanDestroy()

Get whether the Effect can be destroyed right now

Returns: bool Whether the Effect can be destroyed right now

void SetEnableEventFrame(bool enable)

Enable Event_OnFrameUpdate for the effect

NoteRead SEffectManager.Event_OnFrameUpdate for more info
void Event_OnStarted()

Event used when Start was called

Referenced by Start()
void Event_OnStopped()

Event used when Stop was called

Referenced by Stop()
void Event_OnEffectStarted()

Event used when the actual effect started playing

void Event_OnEffectEnded()

Event used when the actual effect stopped playing

void Event_OnFrameUpdate(float time_delta)

Event called on frame when enabled by SetEnableEventFrame(true)

time_delta
float Time passed since the previous frame
NoteCalled from SEffectManager.Event_OnFrameUpdate in MissionGameplay.OnUpdate
void Event_OnRegistered(int id)

Event called from SEffectManager when the Effect is registered

id
int ID registered in SEffectManager
NoteShould only ever be called by SEffectManager!
References SetID(), and m_IsRegistered
void Event_OnUnregistered()

Event called from SEffectManager when the Effect is unregistered

NoteShould only ever be called by SEffectManager!
void OnCheckUpdate()

Event used when EffectParticle.CheckLifeSpan was called (DEPRECATED)

NoteSo this is EffectParticle specific...
NoteEffectParticle.CheckLifeSpan is currently not in use
void SetParent(Object parent_obj, int pivot)

Set parent of the Effect

parent_obj
Object The parent
pivot
int The pivot index
NoteSame as SetAttachmentParent, but more generic name
WarningOnly sets the cached variable, for immediate effect use SetCurrent variant
void SetParent(Object parent_obj)

Set parent of the Effect

parent_obj
Object The parent for the Effect
NoteSame as SetAttachmentParent, but more generic name
WarningOnly sets the cached variable, for immediate effect use SetCurrent variant
Object GetParent()

Get parent of the Effect

Returns: Object The parent of the Effect

NoteSame as GetAttachmentParent, but more generic name
WarningOnly gets the cached variable, for immediate effect use GetCurrent variant
References m_ParentObject
int GetPivotIndex()

Get parent pivot of the Effect, only valid when there is some GetParent

Returns: int The parent pivot of the Effect

WarningOnly gets the cached variable
References m_PivotIndex
void SetCurrentParent(Object parent_obj, bool updateCached = true)

Set current parent of the managed effect

parent_obj
Object The parent for the Effect
updateCached
bool Whether to update the cached variable
NoteSame as SetAttachmentParent, but more generic name
References SetParent()
Object GetCurrentParent()

Get the current parent of the managed Effect

Returns: Object The current parent of the managed Effect

void SetPosition(vector pos)

Set the world position of the Effect

pos
vector The world position for the Effect
WarningOnly sets the cached variable, for immediate effect use SetCurrent variant
References m_Position
vector GetPosition()

Get the world position of the Effect

Returns: vector The world position of the Effect

WarningOnly gets the cached variable, for immediate effect use GetCurrent variant
References m_Position
void SetCurrentPosition(vector pos, bool updateCached = true)

Set the current world position of the managed effect

pos
vector The current world position for the Effect
updateCached
bool Whether to update the cached variable
References SetPosition()
vector GetCurrentPosition()

Get the current world position of the managed effect

Returns: vector The current world position of the managed effect

References vector.Zero
void SetLocalPosition(vector pos)

Set the local position of the Effect

pos
vector The local position for the Effect
WarningOnly sets the cached variable, for immediate effect use SetCurrent variant
References m_LocalPos
vector GetLocalPosition()

Get the local position of the Effect

Returns: vector The lcoal position of the Effect

WarningOnly gets the cached variable, for immediate effect use GetCurrent variant
References m_LocalPos
void SetCurrentLocalPosition(vector pos, bool updateCached = true)

Set the current local position of the managed effect

pos
vector The current local position for the managed effect
updateCached
bool Whether to update the cached variable
vector GetCurrentLocalPosition()

Get the current local position of the managed effect

Returns: vector The current local position of the managed effect

References vector.Zero
protected void SetID(int id)

Set the ID registered in SEffectManager

id
int ID registered in SEffectManager
NoteShould only ever be called by Event_OnRegistered!
References m_ID
int GetID()

Get the ID registered in SEffectManager

Returns: int ID registered in SEffectManager, or 0 (SEffectManager.INVALID_ID) when not registered

References m_ID
bool IsRegistered()

Get whether this Effect is registered in SEffectManager

Returns: bool Whether this Effect is registered in SEffectManager

References m_IsRegistered
void SetAttachmentParent(Object obj)

Set parent for the Effect

obj
Object The parent for the Effect
References SetParent()
Object GetAttachmentParent()

Get the parent set by SetAttachmentParent

Returns: Object The parent set by SetAttachmentParent

References GetParent()
void SetAttachedLocalPos(vector pos)

Set local pos for the Effect relative to the parent

pos
vector The local pos relative to the parent
vector GetAttachedLocalPos()

Get the local pos set by SetAttachedLocalPos

Returns: vector The local pos set by SetAttachedLocalPos

void SetAttachedLocalOri(vector ori)

Set local orientation for the Effectparticle to attach to when the Effect is started

ori
vector The local orientation to use on Start
NoteOverrides the orientation set by EffectParticle.SetOrientation
WarningOnly caches it into a variable to be used by Start, does not live update when called afterwards
References m_LocalOri
vector GetAttachedLocalOri()

Get the local orientation set by SetAttachedLocalOri

Returns: vector The local orientation set by SetAttachedLocalOri

WarningIs not necessarily the current local orientation
References m_LocalOri