DayZ 1.24
Loading...
Searching...
No Matches
HungerSoundHandler.c
Go to the documentation of this file.
2{
3 override void Init()
4 {
5 m_Id = eSoundHandlers.HUNGER;
6 }
7
8}
9
10//---------------------------
11// Client
12//---------------------------
14{
15 const float SOUND_INTERVALS_LIGHT_MIN = 10;
16 const float SOUND_INTERVALS_LIGHT_MAX = 30;
19
20 override void Update()
21 {
22 if (m_Player.GetMixedSoundStates() & eMixedSoundStates.HUNGRY)
24 }
25
35
36 void PlaySound()
37 {
38 m_Sound = SEffectManager.PlaySoundOnObject("hungry_uni_Voice_Char_SoundSet", m_Player);
39
40 if (m_Sound)
42 else
43 Debug.LogError("Missing sounset");
44 }
45}
46
47
48//---------------------------
49// Server
50//---------------------------
class GetServerModListResult m_Id
GetServersResultRow the output structure of the GetServers operation that represents one game server.
eMixedSoundStates
bits
DayZPlayer m_Player
Definition Hand_Events.c:42
float m_SoundTime
void PlaySound()
class HungerSoundHandlerBase extends SoundHandlerBase SOUND_INTERVALS_LIGHT_MIN
const float SOUND_INTERVALS_LIGHT_MAX
EffectSound m_Sound
void ProcessSound()
float GetTime()
eSoundHandlers
Definition Debug.c:14
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
Definition Debug.c:341
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
Definition EnMath.c:7
Manager class for managing Effect (EffectParticle, EffectSound)
static EffectSound PlaySoundOnObject(string sound_set, Object parent_object, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
override void Init()
proto native CGame GetGame()
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106
proto native volatile void Update()