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

[TF2] Help: how do I dynamically change a sound's volume?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LordHotPocketHomicide
Member
Join Date: Aug 2016
Location: This Realm of Existence
Old 02-13-2021 , 22:25   [TF2] Help: how do I dynamically change a sound's volume?
Reply With Quote #1

Hello, folks. I want to change a sound's volume on the fly, while it's already playing, but I can't seem to figure out how. Does anyone have any pointers?
__________________
Professional retard. I might borrow some code, but I always try to give credit when I do! If you've noticed I've borrowed some of your code, and you have a problem with that, please add me on Steam and let me know so I can correct the problem as soon as possible!

Last edited by LordHotPocketHomicide; 02-16-2021 at 10:49.
LordHotPocketHomicide is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 02-16-2021 , 01:55   Re: [TF2] Help: how do I dynamically change a sound's volume?
Reply With Quote #2

I'm not aware of any way for a server plugin to alter the volume of a sound while it is playing.

In fact, the only reliable way I found to increase a sounds volume was to simultaneously play it more than once. I learned that I can stop a sound but only if my plugin was the one that created it. I also learned how to prevent and/or replace sounds fairly reliably.

I wish I had better news for you.
PC Gamer is offline
LordHotPocketHomicide
Member
Join Date: Aug 2016
Location: This Realm of Existence
Old 02-16-2021 , 10:48   Re: [TF2] Help: how do I dynamically change a sound's volume?
Reply With Quote #3

Quote:
Originally Posted by PC Gamer View Post
I'm not aware of any way for a server plugin to alter the volume of a sound while it is playing.

In fact, the only reliable way I found to increase a sounds volume was to simultaneously play it more than once. I learned that I can stop a sound but only if my plugin was the one that created it. I also learned how to prevent and/or replace sounds fairly reliably.

I wish I had better news for you.
Aye, thank you for your reply. It's sad that something like this seems impossible, but I guess that's just the cold reality of things sometimes.
__________________
Professional retard. I might borrow some code, but I always try to give credit when I do! If you've noticed I've borrowed some of your code, and you have a problem with that, please add me on Steam and let me know so I can correct the problem as soon as possible!
LordHotPocketHomicide 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 02:23.


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