71 if (
GetGame().IsDedicatedServer())
bool m_IsRegistered
Whether the effect is registered in SEffectManager.
void Start()
Plays all elements this effects consists of.
void Event_OnRegistered(int id)
Event called from SEffectManager when the Effect is registered.
void Stop()
Stops all elements this effect consists of.
bool m_IsAutodestroy
Whether the Effect cleans up after itself when stopped.
void SetCurrentParent(Object parent_obj, bool updateCached=true)
Set current parent of the managed effect.
bool m_IsPlaying
Whether the Effect is currently playing.
Object m_ParentObject
Cached parent.
int GetID()
Get the ID registered in SEffectManager.
vector GetAttachedLocalPos()
Get the local pos set by SetAttachedLocalPos.
vector GetCurrentPosition()
Get the current world position of the managed effect.
ref ScriptInvoker Event_OnEffectStarted
Event used when the actual effect started playing.
EffectType
Enum to determine what type of effect the Effect is.
Object GetCurrentParent()
Get the current parent of the managed Effect.
bool m_IsPendingDeletion
Whether the Destroy process has already been called.
void SetParent(Object parent_obj)
Set parent of the Effect.
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
bool IsRegistered()
Get whether this Effect is registered in SEffectManager.
bool IsPlaying()
Returns true when the Effect is playing, false otherwise.
void SetCurrentPosition(vector pos, bool updateCached=true)
Set the current world position of the managed effect.
void SetAttachedLocalPos(vector pos)
Set local pos for the Effect relative to the parent.
ref ScriptInvoker Event_OnEffectEnded
Event used when the actual effect stopped playing.
void SetLocalPosition(vector pos)
Set the local position of the Effect.
vector GetLocalPosition()
Get the local position of the Effect.
vector m_Position
Cached world position.
ref ScriptInvoker Event_OnStopped
Event used when Stop was called.
bool IsParticle()
Check whether the Effect is EffectParticle without casting.
void SetAttachmentParent(Object obj)
Set parent for the Effect.
void ValidateStart()
Validation whether an effect truly started playing or if the Effect should stop as none is present.
void SetCurrentLocalPosition(vector pos, bool updateCached=true)
Set the current local position of the managed effect.
vector GetCurrentLocalPosition()
Get the current local position of the managed effect.
void Event_OnFrameUpdate(float time_delta)
Event called on frame when enabled by SetEnableEventFrame(true)
void SetID(int id)
Set the ID registered in SEffectManager.
Event_OnStarted
Event used when Start was called.
vector m_LocalPos
Cached local pos.
EffectType GetEffectType()
Get what type of effect the Effect is.
bool IsSound()
Check whether the Effect is EffectSound without casting.
void SetAttachedLocalOri(vector ori)
Set local orientation for the Effectparticle to attach to when the Effect is started.
void Event_OnUnregistered()
Event called from SEffectManager when the Effect is unregistered.
vector m_LocalOri
Local orientation set by SetAttachedLocalOri, only used by EffectParticle.
vector GetAttachedLocalOri()
Get the local orientation set by SetAttachedLocalOri.
Object GetAttachmentParent()
Get the parent set by SetAttachmentParent.
void OnCheckUpdate()
Event used when EffectParticle.CheckLifeSpan was called (DEPRECATED)
class JsonUndergroundAreaTriggerData GetPosition
Manager class for managing Effect (EffectParticle, EffectSound)
static void EffectUnregister(int id)
Unregisters Effect in SEffectManager.
static const int INVALID_ID
As the counter starts at 1, Effect ID can never be 0.
static ref ScriptInvoker Event_OnFrameUpdate
Static invoker for the SEffectManager.Event_OnFrameUpdate called form MissionGameplay....
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
ScriptInvoker Class provide list of callbacks usage:
proto native CGame GetGame()
void SetEnableEventFrame(bool enable)
Enable Event_OnFrameUpdate for the effect.
proto native void SetPosition(vector position)
Set the world position of the Effect.
proto native void Destroy()
Cleans up the Effect, including unregistering if needed.
bool IsPendingDeletion()
Get whether the Effect is queued up for being cleaned up.
bool IsAutodestroy()
Get whether Effect automatically cleans up when it stops.
bool CanDestroy()
Get whether the Effect can be destroyed right now.
void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.