Frictional Games Forum (read-only)
Whats wrong with this sound - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Whats wrong with this sound (/thread-7142.html)



Whats wrong with this sound - savior10946 - 04-01-2011

void OnStart()
{
AddEntityCollideCallback("Player" , "room_1" , "Collidedoor_1" , true , 0);
}

void Collidedoor_1(string &in asParent , string &in asChild , int alState)
{
SetSwingDoorLocked("door_1", true, true);
PlaySoundAtEntity("", "react_breath1", "Player", 0.0f, false);
}

it wont play the sound when the door slams shut.Whats wrong with it?


RE: Whats wrong with this sound - Anxt - 04-01-2011

Honestly I have run into this issue several times myself, and I really don't know what causes it, or how to fix it. I have preloaded the sound, named the sound, added the filetype inside the sound file field, and none of it works. The only work around I have found is to use an SNT file instead, and if need be, customize one so that it only plays the sound I want it to. If someone knows a simpler solution, I would be most excited to hear it as well.


RE: Whats wrong with this sound - MrBigzy - 04-01-2011

Only .snt extensions will work. PlayMusic will use .ogg though. AFAIK anyway. It's not hard to make a .snt file anyway if need be, it's just a script file for sounds.


RE: Whats wrong with this sound - jens - 04-01-2011

Use PlayGuiSound("react_breath1.ogg", 1); to play ogg files without using a .snt file.