Frictional Games Forum (read-only)

Full Version: How do i make it sound like its coming from a room
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, Im not sure if this is in the right thread. But, I was wondering if anybody know how to make it sounds like a sound is coming from a room.
In the PlaySound Thing I am sure there is a way to set where it's comming from.

(Quick copy from mine)
PlaySoundAtEntity("","break_wood_metal", "AreaBreakEffect", 0, false);

The Break_wood_metal is the sound. And the AreaBreakEffect is an area I made where the sound should be.

Hope this helped.
(05-16-2011, 06:09 PM)laser50 Wrote: [ -> ]In the PlaySound Thing I am sure there is a way to set where it's comming from.

(Quick copy from mine)
PlaySoundAtEntity("","break_wood_metal", "AreaBreakEffect", 0, false);

The Break_wood_metal is the sound. And the AreaBreakEffect is an area I made where the sound should be.

Hope this helped.

Ill try, thanks for the quick response ^^
PlaySoundAtEntity("", "SoundFile.snt", "EntityToPlaySoundAt", 1.0f, false);

The "EntityToPlaySoundAt" determines where the sound comes from.
You just have to put an entity in the room where you want the noise to come from and use play sound at entity, (the entity being inside that room)
Hi I got it working but the sound keeps repeating itself how do i prevent this?
I think there is a stopsound function you can use for that, dont know exactly tho sorry
StopSound("soundname", 1);

1 would be the fade time for the sound to fade out.
I'm not sure if this has an impact on whether it'll work or not, but when in the stop sound, the sound name is refering to the first blank in the play sound at entity. The SoundName can be made up; it is used for refering to the individual command to play this sound.

PlaySoundAtEntity("SoundName", "SoundFile", "EntityToPlaySoundAt", 1, false);

Then have:

StopSound("SoundName", 1);