01-15-2015, 11:32 AM
01-15-2015, 11:51 AM
Where do you want to play this sound? Is it ambient or on the player? If it's a sound on the player, like a gasp or reaction, you usually play it on the player using PlayGuiSound. Otherwise, if the sound has a source in the level, use PlaySoundAtEntity. Use either one along with a collision callback to trigger it when the player enters an area.
PHP Code:
AddEntityCollideCallback("Player", "AreaName", "FuncName", true, 1);
PlaySoundAtEntity("SoundName", "SoundFile.snt", "EntityName", 0, false);
01-15-2015, 02:31 PM
PlaySoundAtEntity("12_girl_scream", "12_girl_scream.snt", "GirlScream01", 1.0f, true);
Why not just as above...
Entity is also an area...
THink it could become a bit confucing for starters Mud, don't you think?
I think its best to keep starters on the PlaySoundAtEntity function.. Always works!
Why not just as above...
Entity is also an area...
THink it could become a bit confucing for starters Mud, don't you think?
I think its best to keep starters on the PlaySoundAtEntity function.. Always works!
01-15-2015, 10:00 PM
My bad, I typo'ed Area instead of Entity. Slipped my mind. The correct function is called PlaySoundAtEntity, not PlaySoundAtArea, but it works just like I explained above.
Edited my post.
Edited my post.