From Test-Scratch-Wiki

Change Volume by ()
2.0 Change Volume by ().png
Category Sound
Type Stack
Introduced in 1.2

The Change Volume by () block is a Sound block and a Stack block. The block changes the volume of a sprite by the specified amount. This only affects the sprite (or the Stage) that the block is in.

Example Uses

As this block changes a sprite's volume, it is widely used in projects that let you change the project's volume.

Some common uses for the Change Volume by () block:

  • Volume controls
when this sprite clicked
change volume by (-10)
  • As a sprite gets further away from the viewer, their noises are quieter
change size by (-25)
change volume by (-25)
  • Songs made with the Sound blocks that have loud and quiet parts
play note (60 v) for (1) beats
set volume to (50)%
play note (60 v) for (1) beats
change volume by (25)
play note (60 v) for (1) beats
change volume by (25)
play note (60 v) for (1) beats

Workaround

Main article: List of Block Workarounds

This block can be replicated with the following code:

set volume to ((volume) + (amount))%

See Also

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