53 if (
g_Game.GetDayTime() >= 22.0 ||
g_Game.GetDayTime() < 7.0 )
68 m_Player.OnPlayerReceiveFlashbangHitEnd();
80 void SetupFlashbangValues(
float progress_mult = 1.0,
float visual_value_max = 1.0,
float sound_value_max = 1.0)
98 Error(
"" +
this +
" not initialized");
103 MiscGameplayFunctions.GetHeadBonePos(
m_Player, pos);
130 m_Player.SetMasterAttenuation(
"FlashbangAttenuation");
172 Error(
"" +
this +
" not initialized");
Super root of all classes in Enforce script.
Wrapper class for managing sound through SEffectManager.
bool SoundPlay()
Plays sound.
void SetSoundMaxVolume(float volume)
Set the sound max volume.
void SetSoundFadeOut(float fade_out)
Set the sound fade out duration.
void SetSoundWaveKind(WaveKind wave_kind)
Set WaveKind for the sound.
override void SetParent(Object parent_obj)
Set parent for the sound to follow.
void SoundStop()
Stops sound.
void SetSoundFadeIn(float fade_in)
Set the sound fade in duration.
void SetSoundLoop(bool loop)
Set if the sound loops.
override bool IsPlaying()
Returns true when the effect is playing, false otherwise.
void SetupFlashbangValues(float progress_mult=1.0, float visual_value_max=1.0, float sound_value_max=1.0)
protected void SetAttenuationFilter()
void Update(float deltatime)
protected bool m_Initialized
protected float m_HitDuration
SFX will be played ~0.5s AFTER VFX.
void FlashbangEffect(PlayerBase player, bool visual=true)
protected EffectSound m_FlashbangEffectSound
protected float m_TimeActive
protected void ResetAttenuationFilter()
protected float m_DayTimeToggle
protected float m_SoundStopTime
protected ref Timer m_DeferAttenuation
protected float m_AlphaMaxActual
protected void SetVisual(float val)
protected PlayerBase m_Player
protected float m_BreakPoint
protected float m_ProgressMultiplier
protected void StopSound()
protected float m_SoundMaxActual
protected const float SOUND_DEFER_TIME
protected PPERequester_FlashbangEffects m_Requester
protected void ClearVisual()
protected void PlaySound()
protected const float ALPHA_MAX
protected const float ALPHA_MIN
Manager class for managing Effect (EffectParticle, EffectSound)
static EffectSound CreateSound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false, bool enviroment=false)
Create an EffectSound.
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
void Error(string err)
Messagebox with error message.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...