Skip to content

Sound volume based on distance

Make any sound volume on any channel increase and decrease based on distance.

Authors and contributors to this experimental extension: VegeTato.

Warning

This is an extension made by a community member and it only got through a light review by the GDevelop extension team. As such, we can't guarantee it meets all the quality standards of fully reviewed extensions.


User can

  • Set any channel volume based on the distance betwen 2 objects.
  • Use the extension action multi times on different objects.
  • Set the Sound range.
  • Set the maximum volume range.

Example

Tip

Learn how to install new extensions by following a step-by-step guide.

Actions

Sound volume based on distance
Change a channel volume based on distance between 2 objects.

See parameters
  • Parameter 1 (👾 Object): Player object
  • Parameter 2 (👾 Object): Sound source object
  • Parameter 3 (🔢 Number): Sound channel
  • Parameter 4 (🔢 Number): Sound range How far the player can go before the sound start fading out.
  • Parameter 5 (🔢 Number): Max volume range (in pixels) Distance between object and sound source object to get the maximum volume.
    Note: increasing max volume range will also increase the sound range.

Technical note: parameters 0, 6 are internal parameters handled by GDevelop.


This page is an auto-generated reference page about the Sound volume based on distance extension, made by the community of GDevelop, the open-source, cross-platform game engine designed for everyone. Learn more about all GDevelop community-made extensions here.