From Test-Scratch-Wiki

(Redirected from Eng:Set Volume to () % (block))

Set Volume to () %
2.0 Set Volume to ().png
Category Sound
Type Stack
Introduced in 1.2

The Set Volume to () % block is a Sound block and a Stack block. The block sets its sprite's volume to the specified amount. It only affects the sprite (or the Stage) that the block is in.

Example Uses

As the block sets its the volume of a sprite or the Stage, it is used when the volume needs to be set to a specified amount, rather than increasing or decreasing.

Some common uses for the Set Volume to () % block:

  • Volume controls
set volume to (volume slider)%
  • Changing sound effect volume (the further away the noise-maker is, the quieter the sound effect should be)
set volume to ((100) - ((distance to [noise v]) / (2)))%
  • Songs made with the Sound blocks that have loud and quiet parts
set volume to (100)%
play note (60 v) for (0.5) beats
play note (65 v) for (0.4) beats
set volume to (75)%
play note (48 v) for (1) beats

See Also

Cookies help us deliver our services. By using our services, you agree to our use of cookies.