• Capturing sound from far away
    2 replies, posted
Hi FacePunch, I'm currently building a newsman job for my roleplay gamemode from scratch. I got my shit together with render targets and stuff, but now I kinda ran into a big problem: sound recording. How do I get a player to simulate the sound like if he was somewhere else at the same time? Is there an entity I can create like "point_soundlistener" or something? Thanks in advance.
this sounds like a really difficult task. unless gmod has some function that can do something like this: [lua] local recordedsounds={} local recording=false local timefromrecord=CurTime() -- i am not giving you a solution, this is an example of what could be done if the hook really exists hook.Add("SoundCreate","soundrecorder",function(snd) -- snd could be a CSoundPatch table.insert(recordedsounds,{sound=snd,time=CurTime()-timefromrecord}) end) [/lua] then i don't know what to give you. i don't know if there is a hook that has something to do with a sound being emitted.
Thanks for your help mitterdoo. I found a magic entity on the Valve Docs: env_microphone. Microphone:[url]https://developer.valvesoftware.com/wiki/Env_microphone[/url] Speaker:[url]https://developer.valvesoftware.com/wiki/Env_speaker[/url] This way I can create a speaker system really easily. Problem solved ;)
Sorry, you need to Log In to post a reply to this thread.