GetGameSoundParams Function

Retrieves the parameters for a game sound.

Game sounds are found in a game's scripts/game_sound.txt or other files referenced from it

Note that if a game sound has a rndwave section, one of them will be returned at random.

bool GetGameSoundParams(const char[] gameSound, int& channel, int& soundLevel, float& volume, int& pitch, char[] sample, int maxlength, int entity)

Parameters

const char[] gameSound

Name of game sound.

int& channel

Channel to emit with.

int& soundLevel
No description.
float& volume

Sound volume.

int& pitch

Sound pitch.

char[] sample

Sound file name relative to the "sound" folder.

int maxlength

Maximum length of sample string buffer.

int entity

Entity the sound is being emitted from.

Return Value

True if the sound was successfully retrieved, false if it was not found