Volume changing problems with ACS

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Volume changing problems with ACS

Postby The T_W_C » Sat Feb 20, 2021 12:21 am

I have a couple of areas set up where I cut the music volume to zero to really up the atmosphere up the section,

and that has worked just fine.

But I can not seem to get the volume to go back no matter.

I have all my linedefs set up to execute the scripts properly

but I can not get the music playing again.

I have uploaded my SCRIPTS.txt

and two screenshots of the Linedefs I am using to execute the 2 scripts in question.
You do not have the required permissions to view the files attached to this post.
The T_W_C
 
Joined: 01 Dec 2020
Discord: Toilet_Wine_Connoisseur#7341

Re: Volume changing problems with ACS

Postby Player701 » Sat Feb 20, 2021 12:55 am

SetMusicVolume accepts a fixed point value, so you should write 1.0 instead of just 1 when you want to restore the volume. 0 is the same as 0.0, but 1 is actually 1/65536 = 0.0000152587890625, which is most certainly not what you were expecting, and that's why you don't hear anything when you call SetMusicVolume(1).
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Volume changing problems with ACS

Postby The T_W_C » Sat Feb 20, 2021 11:32 am

Player701 wrote:SetMusicVolume accepts a fixed point value, so you should write 1.0 instead of just 1 when you want to restore the volume. 0 is the same as 0.0, but 1 is actually 1/65536 = 0.0000152587890625, which is most certainly not what you were expecting, and that's why you don't hear anything when you call SetMusicVolume(1).


thank you so much that fixed my problem instantly!
The T_W_C
 
Joined: 01 Dec 2020
Discord: Toilet_Wine_Connoisseur#7341


Return to Scripting

Who is online

Users browsing this forum: Mikk- and 0 guests