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
Script Help Custom Sounds Not Playing
Dominic0904 Offline
Member

Posts: 63
Threads: 14
Joined: Apr 2011
Reputation: 0
#1
Custom Sounds Not Playing

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.
03-17-2013, 08:14 PM
Find
Akos115 Offline
Member

Posts: 101
Threads: 14
Joined: Aug 2012
Reputation: 0
#2
RE: Custom Sounds Not Playing

Is the .snt file named behind_you.snt ?

03-17-2013, 08:26 PM
Find
Dominic0904 Offline
Member

Posts: 63
Threads: 14
Joined: Apr 2011
Reputation: 0
#3
RE: Custom Sounds Not Playing

Yes. I even tried step by step from the tutorial on the wiki with another sound and still nothing :/ I really am baffled and it's bothering me.



Err okay this is really weird, I just restarted the map by existing it and reloading it again from the Main Menu. Now it's working. Had no idea why it didn't work by just clicking "Reload Map" on the debug menu.
(This post was last modified: 03-17-2013, 08:34 PM by Dominic0904.)
03-17-2013, 08:32 PM
Find




Users browsing this thread: 2 Guest(s)