HoS_PRC8/_mod/_module/nss/header_sounds.nss

31 lines
918 B
Plaintext
Raw Permalink Normal View History

2024-11-25 19:36:07 -05:00
void fnSoundAlert(string sSound="as_pl_whistle2");
void fnTeamVoiceOver(string sID,int nSound);
////////////////////////
// Sound player header
///////////////////////
void fnSoundAlert(string sSound="as_pl_whistle2")
{ // play a sound
object oPlaceable;
location lLoc=GetLocation(OBJECT_SELF);
oPlaceable=CreateObject(OBJECT_TYPE_PLACEABLE,"sound_holder",lLoc);
DelayCommand(10.0,DestroyObject(oPlaceable));
AssignCommand(oPlaceable,PlaySound(sSound));
} // fnSoundAlert()
void fnTeamVoiceOver(string sID,int nSound)
{ // PURPOSE: play team voice over
object oPlaceable;
location lLoc=GetLocation(OBJECT_SELF);
string sSound=sID+IntToString(nSound)+"_l";
sSound=GetStringLowerCase(sSound);
oPlaceable=CreateObject(OBJECT_TYPE_PLACEABLE,"sound_holder",lLoc);
DelayCommand(10.0,DestroyObject(oPlaceable));
AssignCommand(oPlaceable,PlaySound(sSound));
} // fnTeamVoiceOver()