Snd functions
Sound related functions.
Functions
Snd_GetDistToSource
Snd_GetDistToSource
Calculates the distance beetwen the npc and the source of the last played sound
Parameters
var C_NPC npc
- instance of the NPC
Return value
The function returns distance between the NPC and the source of the last sound in cm
Snd_IsSourceItem
Snd_IsSourceItem
Check whether the source of the last sound was item
Parameters
var C_NPC npc
- instance of the NPC
Globals
item
- set to the source if it was an item
Return value
The function returns TRUE if the source was an item, FALSE otherwise
Snd_IsSourceNpc
Snd_IsSourceNpc
Check whether the source of the last sound was npc
Parameters
var C_NPC npc
- instance of the NPC
Globals
other
- set to the source if it was an NPC
Return value
The function returns TRUE if the source was an NPC, FALSE otherwise
Snd_Play
Snd_Play
Plays a sound
Parameters
var string sndName
- C_SFX instance name
Snd_Play3D
Snd_Play3D
Plays a sound at the position of the npc
Parameters
var C_NPC npc
- instance of the NPCvar string sndName
- C_SFX instance name