I am trying to add a custom sound to a grunt when the player is forced to turn around and look at him. This is what i have.
void OnStart()
{
AddEntityCollideCallback("Player", "precious", "LookAtGrunt", true, 1);
}
void LookAtGrunt(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("ghostgrunt", true);
ShowEnemyPlayerPosition("ghostgrunt");
AddTimer("", 2, "TimerGruntEnd");
PlaySoundAtEntity("", "precious.snt", "Player", 0, false);
StartPlayerLookAt("ghostgrunt", 10, 50, "");
AddTimer("", 2, "TimerStopPlayerLook");
}
void TimerStopPlayerLook (string &in asTimer)
{
StopPlayerLookAt();
}
void OnEnter()
{
}
void OnLeave()
{
}
everything works but the sound, it won't play for some odd reason. I have my sound file in mysounds folder under my custom story. I also have the .snt file. Inside it looks like this:
<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="precious.ogg" />
</Main>
</SOUNDS>
<PROPERTIES Volume="5" MinDistance="1" MaxDistance="50" Random="0" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="false" Blockable="False" BlockVolumeMul="0.7" Priority="5" />
</SOUNDENTITY>
Can anyone help?