Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: rmonic79 on Fri 02/10/2020 15:59:12

Title: Proportional Sliders volumes
Post by: rmonic79 on Fri 02/10/2020 15:59:12
Guys maybe you can help me to simplify something that in the last game i made took a lot of time, we're near to release and i'd like, if possible, to avoid time consuming stuff.
the problem is: if i set a volume, for an fx for example, within game to 30 and then the player set slider fx value from 100 to 80 the volume of the fx goes to 80 instead of a percentage of of it (24 in this case).
Now i used a solution that works fine on previous game but an automatized stuff not room by room and sound by sound would be great.
Thanks;
Title: Re: Proportional Sliders volumes
Post by: Crimson Wizard on Fri 02/10/2020 16:07:40
We discussed this briefly on Discord recently, and the most simple way seem to be using System.Volume, which is a master volume and applies a relative factor. The downside is that you cannot have separate sound type volume.

Besides that, the more complex idea I had in mind at some point was to have an array of "default clip volumes", size of max channels, and for each clip you start playing you save its default volume in that array (based on channel ID it ended up on). Then when a volume slider is changed you assign new volume by hand to all currently playing clips, using that previously saved default clip volume as a reference.
Title: Re: Proportional Sliders volumes
Post by: rmonic79 on Tue 06/10/2020 17:15:29
I'll make a try Thanks Crimson! :)