381 SoundError(
"FadeIn is longer than sound wave length.");
387 SoundError(
"FadeOut is longer than sound wave length.");
393 SoundError(
"FadeIn & FadeOut are longer than sound wave length.");
492 super.Event_OnRegistered(
id);
503 super.Event_OnUnregistered();
632 return super.GetParent();
645 return super.GetParent();
662 pos = parent.WorldToModel(pos);
bool m_IsPlaying
Whether the Effect is currently playing.
Object m_ParentObject
Cached parent.
ref ScriptInvoker Event_OnEffectStarted
Event used when the actual effect started playing.
EffectType
Enum to determine what type of effect the Effect is.
ref ScriptInvoker Event_OnEffectEnded
Event used when the actual effect stopped playing.
vector GetLocalPosition()
Get the local position of the Effect.
ref ScriptInvoker Event_OnStopped
Event used when Stop was called.
Event_OnStarted
Event used when Start was called.
class SoundObjectBuilder SoundObject(SoundParams soundParams)
void SoundObjectBuilder(SoundParams soundParams)
class JsonUndergroundAreaTriggerData GetPosition
proto bool IsHeaderLoaded()
proto float GetLength()
WARNING: Blocking! Waits for header to load.
proto void Loop(bool setLoop)
AbstractWaveEvents GetEvents()
proto void SetVolumeRelative(float value)
proto void SetDoppler(bool setDoppler)
Wrapper class for managing sound through SEffectManager.
bool SoundLoadEx(out SoundParams params)
Loads in the sound when it is requested for playing through 'SoundPlayEx'.
override void SetCurrentLocalPosition(vector pos, bool updateCached=true)
Set the current local position of the managed sound.
void SetSoundSet(string snd)
Set soundset for the sound.
void Event_OnSoundWaveEnded()
Event called when sound stops playing.
override vector GetCurrentLocalPosition()
Get the current local position of the managed sound.
override bool IsPlaying()
Returns true when the effect is playing, false otherwise.
ref SoundParams m_SoundParams
void UpdateEvents()
Enables the frame event on the EffectSound.
ref ScriptInvoker Event_OnSoundWaveStarted
override void Start()
Plays sound.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
void SetSoundAutodestroy(bool auto_destroy)
Sets whether EffectSound automatically cleans up when sound stops.
override void SetParent(Object parent_obj)
Set parent for the sound to follow.
override Object GetParent()
Get parent for the EffectSound.
float GetSoundWaveLenght()
Get the sound wave length.
float GetSoundVolume()
Get the RELATIVE volume set by 'SetSoundVolume'.
float m_SoundFadeInDuration
void SoundError(string err_msg)
Helper for throwing sound errors.
void SetSoundMaxVolume(float volume)
Set the sound max volume.
void SoundReset()
Resets EffectSound.
AbstractWave m_SoundWaveObject
string GetSoundSet()
Get soundset for the sound.
override void Event_OnRegistered(int id)
Event called from SEffectManager when the Effect is registered.
void SetDoppler(bool setDoppler)
Set if the sound has the doppler effect enabled.
override void InitEffect()
init
bool m_SoundWaveIsPlaying
override vector GetCurrentPosition()
Get the current world position of the managed sound.
bool SoundPlayEx(out SoundParams params)
Plays sound.
ref ScriptInvoker Event_OnSoundFadeOutStarted
void SetSoundLoop(bool loop)
Set if the sound loops.
float m_SoundFadeOutInitVolume
ref ScriptInvoker Event_OnSoundFadeInStopped
void ValidateSoundWave()
Gets called to fill in the necessary data when the header has finished loading.
override void Event_OnFrameUpdate(float time_delta)
Event called on frame when enabled by SetEnableEventFrame(true)
override Object GetCurrentParent()
Get parent for the EffectSound.
void Event_OnSoundFadeOutStarted()
Event called when sound fade out starts.
void SetSoundVolume(float volume)
Set the RELATIVE volume for the sound.
override EffectType GetEffectType()
Get what type of effect the Effect is.
bool SoundLoad()
Loads in the sound when it is requested for playing.
void SetSoundFadeIn(float fade_in)
Set the sound fade in duration.
override void Stop()
Stops sound.
void Event_OnSoundFadeInStopped()
Event called when sound fade in stops.
override bool IsSound()
Check whether the Effect is EffectSound without casting.
override bool CanDestroy()
void SetSoundWaveKind(WaveKind wave_kind)
Set WaveKind for the sound.
void SetSoundFadeOut(float fade_out)
Set the sound fade out duration.
float m_SoundFadeOutStartTime
bool IsSoundPlaying()
Get whether EffectSound is currently playing.
float GetSoundWaveLength()
Get the sound wave length.
void SetEnviromentVariables(bool setEnvVariables)
Sets whether AddEnvSoundVariables needs to be called during Loading.
override bool IsAutodestroy()
Get whether Effect automatically cleans up when it stops.
bool SoundWaveValidation()
Validation of fade settings.
void Event_OnSoundWaveStarted()
Event called when sound starts playing.
bool IsSoundValid()
Helper for checking if params are valid.
ref SoundObjectBuilder m_SoundObjectBuilder
float m_SoundFadeOutDuration
override string GetDebugName()
Override when getting debug information.
bool IsSoundAutodestroy()
Get whether EffectSound automatically cleans up when sound stops.
ref SoundObject m_SoundObject
ref ScriptInvoker Event_OnSoundWaveEnded
bool SoundPlay()
Plays sound.
override void SetCurrentPosition(vector pos, bool updateCached=true)
Set the world position of the managed sound.
override void Event_OnUnregistered()
Event called from SEffectManager when the Effect is unregistered.
float m_SoundWaveVolumeMax
void SoundStop()
Stops sound.
float GetSoundWaveTime()
Get the time since EffectSound started playing.
Manager class for managing Effect (EffectParticle, EffectSound)
static void Event_OnSoundWaveEnded(EffectSound effect_sound)
Event called from EffectSound.Event_OnSoundWaveEnded.
ScriptInvoker Class provide list of callbacks usage:
proto native CGame GetGame()
void SetEnableEventFrame(bool enable)
Enable Event_OnFrameUpdate for the effect.