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
My custom sound won't work?
taz251 Offline
Junior Member

Posts: 7
Threads: 3
Joined: Jul 2012
Reputation: 0
#1
My custom sound won't work?

I am trying to add a custom sound to a grunt when the player is forced to turn around and look at him. This is what i have.

void OnStart()
{
AddEntityCollideCallback("Player", "precious", "LookAtGrunt", true, 1);

}

void LookAtGrunt(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("ghostgrunt", true);
ShowEnemyPlayerPosition("ghostgrunt");
AddTimer("", 2, "TimerGruntEnd");
PlaySoundAtEntity("", "precious.snt", "Player", 0, false);
StartPlayerLookAt("ghostgrunt", 10, 50, "");
AddTimer("", 2, "TimerStopPlayerLook");
}

void TimerStopPlayerLook (string &in asTimer)
{
StopPlayerLookAt();
}

void OnEnter()
{

}

void OnLeave()
{

}



everything works but the sound, it won't play for some odd reason. I have my sound file in mysounds folder under my custom story. I also have the .snt file. Inside it looks like this:

<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="precious.ogg" />
</Main>
</SOUNDS>
<PROPERTIES Volume="5" MinDistance="1" MaxDistance="50" Random="0" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="false" Blockable="False" BlockVolumeMul="0.7" Priority="5" />
</SOUNDENTITY>



Can anyone help? Undecided
07-30-2012, 07:42 PM
Find


Messages In This Thread
My custom sound won't work? - by taz251 - 07-30-2012, 07:42 PM
RE: My custom sound won't work? - by taz251 - 07-30-2012, 08:04 PM
RE: My custom sound won't work? - by Adny - 07-30-2012, 10:46 PM



Users browsing this thread: 1 Guest(s)