Raised This Month: $51 Target: $400
 12% 

Emit Sound at origin?


Post New Thread Reply   
 
Thread Tools Display Modes
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-22-2007 , 03:01   Re: Emit Sound at origin?
Reply With Quote #11

No, client_cmd(id, "spk wav_file").

A distance check is very easy but the problem is the info, we don't know who this special user is, why does only he hear it? Is it some skill for a mod? Maby it's cuz he has some certain model.

If you tell me what's special about him, I can probably make it.
Though the origin part probably isn't possible...
[ --<-@ ] Black Rose is offline
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 11-22-2007 , 05:02   Re: Emit Sound at origin?
Reply With Quote #12

It wouldn't be able to be scaled volume-wise based on distance, but you could do a distance check to make sure he's close enough and then speak the sound to him.
__________________
Bad_Bud is offline
BigDontCry
Member
Join Date: Nov 2007
Location: Sweden
Old 11-22-2007 , 13:25   Re: Emit Sound at origin?
Reply With Quote #13

Quote:
Originally Posted by [ --<-@ ] Black Rose View Post
No, client_cmd(id, "spk wav_file").

A distance check is very easy but the problem is the info, we don't know who this special user is, why does only he hear it? Is it some skill for a mod? Maby it's cuz he has some certain model.

If you tell me what's special about him, I can probably make it.
Though the origin part probably isn't possible...
Yes, it's a skill for a mod I'm working on...
__________________
Big Men Don't Cry

Quote:
[20:23] [email protected]: I don't know how
[20:23] [email protected]: I'm only 15
[20:23] [email protected]: I don't know anything
BigDontCry is offline
BigDontCry
Member
Join Date: Nov 2007
Location: Sweden
Old 11-22-2007 , 14:35   Re: Emit Sound at origin?
Reply With Quote #14

...but if the origin part isn't possible, you shouldn't waste your time to help me... I'll just have to think out another skill that reminds of the one that I had in mind... Maybe it'll be like the ESP skill in the Credits Mod or something like that.

Thanks anyways guys...
__________________
Big Men Don't Cry

Quote:
[20:23] [email protected]: I don't know how
[20:23] [email protected]: I'm only 15
[20:23] [email protected]: I don't know anything
BigDontCry is offline
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 11-22-2007 , 21:59   Re: Emit Sound at origin?
Reply With Quote #15

It's easily possible, but you won't be able to have the volume scale based on distance or be able to have the sound come from a specific direction if it's only able to be heard by specific users.

Get the origin of the player emitting the sound, then do a loop through all of the other players and use get_distance or get_distance_f to check to see if each player is close enough to hear the sound, and if they are, execute the sound as a speak in their console.

Actually, I was just thinking, and you could probably cheat and make it work by playing the sound where everyone can hear it, and immediately checking each player again to see if they are allowed to hear the sound or not. If they are not allowed to hear the sound, emit another sound on top of each player that is not allowed to hear it (using the same sound channel so it cancels the last one out) using practically no radius for the sound so it's prettymuch only able to be "heard" by the player not allowed to hear the main emit.

Sorry that I'm extremely horrible at explaining stuff, but I think that would work, and I hope you understand what I was trying to say.
__________________

Last edited by Bad_Bud; 11-22-2007 at 22:03.
Bad_Bud is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 11-22-2007 , 22:00   Re: Emit Sound at origin?
Reply With Quote #16

Quote:
Originally Posted by Bad_Bud View Post
It's easily possible, but you won't be able to have the volume scale based on distance if it's only able to be heard by specific users.

Get the origin of the player emitting the sound, then do a loop through all of the other players and use get_distance or get_distance_f to check to see if each player is close enough to hear the sound, and if they are, execute the sound as a speak in their console.
That is smart
__________________
M249-M4A1 is offline
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 11-22-2007 , 22:03   Re: Emit Sound at origin?
Reply With Quote #17

Actually, I just edited the post with something smarter and more practical.
__________________
Bad_Bud is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-23-2007 , 07:00   Re: Emit Sound at origin?
Reply With Quote #18

I don't think your idea works. emit_sound is still global...

Is there a function to play a sound for a specific player wich you can also set volume and maby even pan?

Last edited by [ --<-@ ] Black Rose; 11-23-2007 at 07:24.
[ --<-@ ] Black Rose is offline
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 11-24-2007 , 03:59   Re: Emit Sound at origin?
Reply With Quote #19

Hmm I was thinking you could set the radius on it... so I guess I don't know what you would do then. What to the att flags do?
__________________
Bad_Bud is offline
sekac
Senior Member
Join Date: Nov 2016
Old 06-18-2018 , 14:39   Re: Emit Sound at origin?
Reply With Quote #20

Well sorry for reviving this, but I came across this randomly and decided to post it. I think this has a feature that is requested here. https://gamebanana.com/gamefiles/4208
sekac is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:10.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode