Hey there guys, I have tried triggering a custom sound to play when I walk though a trigger but it's not working. I get no script errors when reloading the level.
Here is how the script looks
Quote: //This triggers the function that plays the sound piece "there's something behind you"
AddEntityCollideCallback("Player", "BehindYou_01", "SoundPiece_01", true, 1);
void SoundPiece_01(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "behind_you.snt", "Player", 0, false);
}
Here is the .snt file. (I just copied it from one of the Amnesia .snts and changed the .ogg)
Quote:<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="behind_you.ogg" />
</Main>
</SOUNDS>
<PROPERTIES Volume="1" MinDistance="5" MaxDistance="30" Random="1" Interval="5" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="False" Blockable="False" BlockVolumeMul="0.8" Priority="0" />
</SOUNDENTITY>
The .ogg and .snt file is in my sounds folder like this;
CustomStoryName/sounds/.ogg and .snt here.
What am I doing wrong? I cannot keep to figure it out.