DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
InfectedSoundEventBase.c
Go to the documentation of this file.
2{
4}
5
7{
9
11 {
13 }
14
16 {
18 }
19
20 void Init(ZombieBase pInfected)
21 {
22 m_Infected = pInfected;
23 }
24
25 void SoftStop()
26 {
28 {
30 m_SoundSetCallback = null;
31 }
32 }
33
34 override void Stop()
35 {
37 {
39 m_SoundSetCallback = null;
40 }
41
43 }
44
45 void PosUpdate()
46 {
48 {
50 }
51 }
52
53 override bool Play()
54 {
55 string soundset_name;
56
57 soundset_name = string.Format("%1_%2_SoundSet", m_Infected.ClassName(), m_SoundSetNameRoot);
58 m_SoundSetCallback = m_Infected.ProcessVoiceFX(soundset_name);
60 {
61 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLaterByName(this, "PosUpdate", 0, true);
62 return true;
63 }
64 string error = "[%1] No sound callback for : \'%2\' in state: \'%3\' Please define relevant SoundSet in %4";
65 #ifdef DEVELOPER
66 Error(string.Format(error, "ERROR", m_Infected.ClassName(), m_SoundSetNameRoot, "Zombie_SoundSets.hpp"));
67 #else
68 PrintToRPT(string.Format(error, "WARNING", m_Infected.ClassName(), m_SoundSetNameRoot, "sounds/hpp/config.cpp"));
69 #endif
70 return false;
71 }
72}
eBleedingSourceType m_Type
override Widget Init()
Definition DayZGame.c:122
void Stop()
Stops all elements this effect consists of.
Definition Effect.c:179
void ~InfectedSoundEventBase()
enum EInfectedSoundEventType m_Infected
void SoftStop()
void PosUpdate()
EInfectedSoundEventType
protected EAnimPlayState Play()
AbstractWave m_SoundSetCallback
Definition SoundEvents.c:86
string m_SoundSetNameRoot
Definition SoundEvents.c:91
proto void Loop(bool setLoop)
proto void SetPosition(vector position)
proto void Stop()
override ScriptCallQueue GetCallQueue(int call_category)
Definition DayZGame.c:1153
proto void CallLaterByName(Class obj, string fnName, int delay=0, bool repeat=false, Param params=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto void RemoveByName(Class obj, string fnName)
remove specific call from queue
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90
proto void PrintToRPT(void var)
Prints content of variable to RPT file (performance warning - each write means fflush!...
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.
const int CALL_CATEGORY_GAMEPLAY
Definition tools.c:10