What's problem you are encountering?
I need a way to increase the volume of a sound depending on how close a sprite is to another sprite What have you tried that didn't work?
The distance block reports the opposite and sounds can only be a max of 100% volume
I can’t test it with sounds because on I pads sound doesn’t work
Just saying, they don't NEED your remap block. The math is actually not that hard, once you understand it.
The math is just finding the percentage of the value in some other value, then putting that percentage inside another value. Here's what I mean, if you don't understand it.
I don’t quite understand
What I’m making is a radar that gets louder depending on how far you are away from the target sprite, that sprite moves around, as well as getting faster
What I don’t know is how that translates to values of Snap ! sound volume. It may be a logarithmical relationship, like with decibels: dV = 10 x log ( Ia / Ib)^2 = 20 x log ( Ia / Ib), with dV = difference in volume; Ia = intensity at distance a; Ib = intensity at distance b. If Snap ! volume percentage were to correspond to the same number of decibels, what it boils down to is the volume is changed by -6 every time the distance is doubled.
I don't think Snap ! sound volumes are in decibels, though.
I'd advise to divide the sound volume by two every time the distance doubles.
To make it all work you would need to specify:
a base distance, within which the sound is at its max, and
the maximum volume level itself.
TLDR use this block:
Advanced version
To make for an even more realistic spatial sound representation, consider changing the pitch (frequency) and (if applicable) tempo as a sprite moves (higher frequency when it approaches, lower when it moves away; just like an emergency vehicle’s siren) - the so-called Doppler effect.