Frictional Games Forum (read-only)

Full Version: Sound Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello Once again I need some help.

I have a Trigger Area Where you collide with it and it makes some Ambient Wind Noise, but the sound is coming from the trigger Area is there any way to make it say come from the door/window or anything (IE louder at window/Door?) Just wondering this will also help for other things (IE when you pick up a key make a Monster sound, not an actual monster sound behind you not at the area. correct?)

Thanks
-GreyFox
Where did you specified in PlaySoundAtEntity function?
Code:
PlaySoundAtEntity("", "yoursound", "*", 0, false);
* : Insert where the sound plays. choose an entity, which is next to the window.
Does It have to be an entity? or could it be another area? But thank you.

This will help alot.

-Grey Fox
Script Areas work like entities.
gotcha, I also have another question, It's about timers this time. I just don't understand why Mine won't work.

void CollideTimer1(string &in asParent, string &in asChild, int alState)
{
AddTimer("Laugh1", 12, "PlaySoundAtEntity");
PlaySoundAtEntity("laugh1", "laugh.snt", "Player", 0, false);
}

Does it need to be like that ^? Or

void CollideTimer1(string &in asTimer)
{
AddTimer("Laugh1", 12, "PlaySoundAtEntity");
PlaySoundAtEntity("laugh1", "laugh.snt", "Player", 0, false);
}


Which one is correct? I've tried Both and this "Laugh" won't work.
Thanks
-GreyFox
You can't do that. Timer should point to another function, you can't call next line with a timer. Also, don't use the signature functions.

void CollideTimer1(string &in asTimer)
{
AddTimer("Laugh1", 12, "PlaySound");
}

void PlaySound(string &in asTimer)
{
PlaySoundAtEntity("laugh1", "laugh.snt", "Player", 0, false);
}
Okay thank you I can't test it right now but you are a super Moderator. Thank you very much hopefully it works
lol, I'm a human being. Being a moderator doesn't change it Big Grin
haha, Okay and thank you it works the only thing I had to change was....

void collidetimer(string &in asParent....Etc) instead of (string &in asTimer)

then it worked. thanks alot man