Henriksen
Senior Member
Posts: 308
Threads: 71
Joined: Dec 2010
Reputation:
2
|
How do i make it sound like its coming from a room
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.
|
|
05-16-2011, 06:04 PM |
|
laser50
Member
Posts: 242
Threads: 22
Joined: Apr 2011
Reputation:
0
|
RE: How do i make it sound like its 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 |
|
Henriksen
Senior Member
Posts: 308
Threads: 71
Joined: Dec 2010
Reputation:
2
|
RE: How do i make it sound like its coming from a room
(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 ^^
|
|
05-16-2011, 06:10 PM |
|
Roenlond
Senior Member
Posts: 331
Threads: 3
Joined: Apr 2011
Reputation:
0
|
RE: How do i make it sound like its coming from a room
PlaySoundAtEntity("", "SoundFile.snt", "EntityToPlaySoundAt", 1.0f, false);
The "EntityToPlaySoundAt" determines where the sound comes from.
|
|
05-16-2011, 06:10 PM |
|
Rownbear
Member
Posts: 157
Threads: 13
Joined: Apr 2011
Reputation:
2
|
RE: How do i make it sound like its coming from a room
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)
|
|
05-16-2011, 06:28 PM |
|
Henriksen
Senior Member
Posts: 308
Threads: 71
Joined: Dec 2010
Reputation:
2
|
RE: How do i make it sound like its coming from a room
Hi I got it working but the sound keeps repeating itself how do i prevent this?
|
|
05-16-2011, 06:30 PM |
|
Rownbear
Member
Posts: 157
Threads: 13
Joined: Apr 2011
Reputation:
2
|
RE: How do i make it sound like its coming from a room
I think there is a stopsound function you can use for that, dont know exactly tho sorry
|
|
05-17-2011, 04:43 AM |
|
MrBigzy
Senior Member
Posts: 616
Threads: 18
Joined: Mar 2011
Reputation:
8
|
RE: How do i make it sound like its coming from a room
StopSound("soundname", 1);
1 would be the fade time for the sound to fade out.
|
|
05-17-2011, 05:06 AM |
|
Kyle
Posting Freak
Posts: 911
Threads: 36
Joined: Sep 2010
Reputation:
7
|
RE: How do i make it sound like its coming from a room
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);
|
|
05-17-2011, 10:37 AM |
|
|