Hello))
Is there any way to change the volume of a song (sound file) playing in real time via the SpawnSound2D node in a real way using the blueprints (or pluses)?
Thankful in advance for answers.
Hi,
Create a float variable for the volume multiplier. By using two different events, you can increase or decrease the volume multiplier (I used Q and E buttons). Note that for some reason, if you assign 0 to the volume multiplier variable, a bug will happen, so make sure to use a clamp node to forbid assigning 0 to the variable, also forbid to assign high values to not hurt your ears, like I did.
Inside level blueprint. (Note that if you are going to use an input key inside a blueprint, make sure first to enable inputs (unless you are inside level BP or player character BP or player controller BP).
With this setup, you can adjust sound volume in real-time.
Regards,
Thank you so much. Instead of buttons, I used the slider. Everything worked.
You’r welcome. Please mark the question as resolved if this solved your problem.
Regards,
