Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Whats wrong with this sound
savior10946 Offline
Junior Member

Posts: 8
Threads: 7
Joined: Mar 2011
Reputation: 0
#1
Whats wrong with this sound

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?
04-01-2011, 04:47 AM
Find
Anxt Offline
Senior Member

Posts: 588
Threads: 12
Joined: Mar 2011
Reputation: 10
#2
RE: Whats wrong with this sound

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.

04-01-2011, 05:17 AM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#3
RE: Whats wrong with this sound

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.
04-01-2011, 05:32 AM
Find
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#4
RE: Whats wrong with this sound

Use PlayGuiSound("react_breath1.ogg", 1); to play ogg files without using a .snt file.
04-01-2011, 06:52 AM
Website Find




Users browsing this thread: 2 Guest(s)