The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Messages In This Thread
Custom Sounds Not Playing - by Dominic0904 - 03-17-2013, 08:14 PM
RE: Custom Sounds Not Playing - by Akos115 - 03-17-2013, 08:26 PM
RE: Custom Sounds Not Playing - by Dominic0904 - 03-17-2013, 08:32 PM



Users browsing this thread: 1 Guest(s)