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
Kazakarumariou Away
An angry man.

Posts: 283
Threads: 8
Joined: Jul 2012
Reputation: 14
#2
RE: My custom sound won't work?

Inside your custom story folder put "sounds" That's where both files go. If it still is broken use a different ogg converter.
07-30-2012, 08:00 PM
Find
taz251 Offline
Junior Member

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

(07-30-2012, 08:00 PM)Harthex Wrote: Inside your custom story folder put "sounds" That's where both files go. If it still is broken use a different ogg converter.
"I have my sound file in my sounds folder under my custom story."

already did
07-30-2012, 08:04 PM
Find
Kazakarumariou Away
An angry man.

Posts: 283
Threads: 8
Joined: Jul 2012
Reputation: 14
#4
RE: My custom sound won't work?

Change "mysounds" to "sounds"
07-30-2012, 10:39 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#5
RE: My custom sound won't work?

If Harthex's advice doesn't work, try setting the priority to 0 or 1. Oh, and also, the max volume is 1.0f, putting anything above that is pretty much useless. One last thing, if you're using PlaySoundAtEntity and actually want to make it sound like it's coming from a specific entity, make sure "Use3D" is true instead of false.

Also, did you properly convert the sound into an .ogg or did you just try to rename it? If not, I'd suggest using Audacity, it's lightweight and ideal for editing your own sounds.

I rate it 3 memes.
07-30-2012, 10:46 PM
Find




Users browsing this thread: 1 Guest(s)