Frictional Games Forum (read-only)

Full Version: Whats wrong with this sound
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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.
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.
Use PlayGuiSound("react_breath1.ogg", 1); to play ogg files without using a .snt file.