I'm making "radio chatter" to be emitted off of a player and the problem is that it's too loud for the person emitting the sound and not loud enough for those nearby to hear it. I used a bot to test this out and apparently the sound is being emitted at its feet. So I'm wondering if there's a way to either lower the receiving volume for the person emitting it and/or raising the volume for others nearby to hear it. If not, would there be a way to change the location for it to be emitted (while still being attached to the player) or making it so the player doesn't have ears at his/her feet?
Could you explain more about the kind of things you want? Do you want every play to be emitting this sound? Emit it from certain players only?
[QUOTE=Lordgunner58;40017944]Could you explain more about the kind of things you want? Do you want every play to be emitting this sound? Emit it from certain players only?[/QUOTE]
Every player within one specific faction will be emitting the sound. Any player can hear the sound.
[CODE]
-- Range: The higher the range the further away people can head the sound
local sound = { dir = "sound.wav", range = 180, pitch = 100, volume = 0.2 } -- Sets the variables for the sound
for k,v in pairs(player.GetAll()) do -- Cycles through all the players!
local pos = v:GetBonePosition(10) -- Gets the players head position!
sound.Play( sound.dir, pos, sound.range, sound.pitch , sound.volume ) -- Plays the sound at the persons head!
end
[/CODE]
Hope this helps you!
[QUOTE=Lordgunner58;40018024][CODE]
-- Range: The higher the range the further away people can head the sound
local sound = { dir = "sound.wav", range = 180, pitch = 100, volume = 0.2 } -- Sets the variables for the sound
for k,v in pairs(player.GetAll()) do -- Cycles through all the players!
local pos = v:GetBonePosition(10) -- Gets the players head position!
sound.Play( sound.dir, pos, sound.range, sound.pitch , sound.volume ) -- Plays the sound at the persons head!
end
[/CODE]
Hope this helps you![/QUOTE]
It looks like that would work but I get the following error:
"attempt to call field 'Play' (a nil value)"
I am typing it up now, but is this sound continuous or very short? Because it doesn't continue to move with the player it plays it at one spot? And if it is continuous I would suggest just using this: "http://wiki.garrysmod.com/page/surface/PlaySound" as that will play the sound at everyone. (NOT IN 3D SPACE)
[QUOTE=Lordgunner58;40018315]I am typing it up now, but is this sound continuous or very short? Because it doesn't continue to move with the player it plays it at one spot?[/QUOTE]
It's relatively long. It may sound a little bit weird if it doesn't move with the player.
[QUOTE=Lordgunner58;40018315]I am typing it up now, but is this sound continuous or very short? Because it doesn't continue to move with the player it plays it at one spot? And if it is continuous I would suggest just using this: "http://wiki.garrysmod.com/page/surface/PlaySound" as that will play the sound at everyone. (NOT IN 3D SPACE)[/QUOTE]
The only thing I really need it to do is to have it emit at the person's head instead of at his/her feet (where apparently the player's ears are). I can't seem to figure out a way to do this so any help on how to do it would be useful.
Sorry, you need to Log In to post a reply to this thread.