Frictional Games Forum (read-only)

Full Version: Sound trigger
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want it so when the player walks to a certain spot they will here a noise, I am guessing I need to have it like this:
Code:
AddEntityCollideCallback("Player", "SoundArea1", "Soundtrigger1", true, 1);
I need a void script to play a sound, if that would work. If not, does anybody know what I could do, the only thing I could think of was fade in sound.
Why not try first?
And yeah, it would work.
I don't know a void function for just playing a single sound without fading, that is basically what I am asking.
Would this work?
Code:
AddEntityCollideCallback("Player", "SoundArea", "SoundTrigger1", true, 1);
void SoundTrigger1(string &in asParent , string &in asChild , int alState)
{
  SetEntityActive("whisper" , true);
}
Put together better of course, and with a proper sound that I would put into the map.
Just use PlaySoundAtEntity, it's in the wiki.
I didn't even think of it that way, thank you.