Closed khanghugo closed 4 months ago
What's the usecase for these commands?
To playback sound files very fast that it creates pitch. The way it is done now is to spam flashlight, weapon cycle, use button, speak commands. They only occupy 1-2 channels and the sounds come from the player. This PR exposes the functions and allows to play on different channel along with where the sound is emitted from. It is a less than legit way but it is harmless for any run.
Doesn't that make it even less legit than putting your own audio file and playing it with speak
?
This is purely performative. It can stay vaporware here. I am fine with that.
Edit: r
Nah, it's fine to get it in. Was just wondering.
This one is just left here for more interesting videos like this https://www.youtube.com/watch?v=2q8zCNKMoPQ
But sure.
Thanks
Edit: S_StartDynamicSound might be not what I want. It doesn't work per channel as I thought it would. The reason why I changed to S_StartDynamicSound is to avoid doing extra precache mechanism so any sounds can be played. I think I might need to revert two recent changes and then figure out how to do precache (or maybe not).
Edit 2: Never mind, it is good. I am just hallucinating.
Edit 3: After some more playing around, I think I have to make it similar to
speak
where it emits from where the player view is, rather than player origin. Big TODO in there and I thought it wouldn't come back.Final edit: This should be good. I learn that the issue I've been having is just misusing the attenuation value. So now there are two options to emit sound with two different commands. Though for normal
bxt_emit_sound
, precaching might be a bit complicated for me for now to figure out how to do it properly. Meanwhile,bxt_emit_sound_dynamic
can do that just fine. The difference between the two beside ability to play any sound is probably a jungle of sphagetti behind those twos.bxt_emit_sound
will simply just work whilebxt_emit_sound_dynamic
might weirdly do something to other channels unless we pick correct channel.