-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add bxt_emit_sound #83
Conversation
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 |
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. |
d898d22
to
d9c630d
Compare
73c361d
to
515862e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is all that's left here?
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.