DayZ 1.24
Loading...
Searching...
No Matches
BetaSound Class Reference

Static Private Member Functions

static SoundOnVehicle SaySound (Object source, string sound_name, float distance, bool looped)
 

Detailed Description

Definition at line 1 of file BetaSound.c.

Member Function Documentation

◆ SaySound()

static SoundOnVehicle BetaSound::SaySound ( Object source,
string sound_name,
float distance,
bool looped )
inlinestaticprivate

Definition at line 3 of file BetaSound.c.

4 {
5 bool is_female = source.ConfigGetBool("woman");
6
7
8 string path_class = "CfgActionSounds " + sound_name;
9 string path_sound = path_class + " sounds";
10 //is the action sound class defined ? if not, try to play it as a regular sound
11 if (GetDayZGame().ConfigIsExisting(path_sound))
12 {
13 string path_sound_female = path_class + "_female" + " sounds";
14
15 if (is_female && GetDayZGame().ConfigIsExisting(path_sound_female))
17
22 return sound_object;
23 }
24 else
25 return GetGame().CreateSoundOnObject(source, sound_name, distance, looped);
26 }
DayZGame GetDayZGame()
Definition DayZGame.c:3530
static ref TStringArray ARRAY_STRING
Definition EnMath.c:7
proto native CGame GetGame()
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].

References CachedObjectsArrays::ARRAY_STRING, GetDayZGame(), GetGame(), and Math::RandomInt().

Referenced by ManBase::PlaySound().


The documentation for this class was generated from the following file: