Skip to content

Play Sound ​

Category: Sound

Plays sound effects, BGM, or ME (Music Effect). Behavior changes based on the selected Type: sound effects can be played overlapping, while BGM and ME play only one track in a replacement style.

Use the 5 Types for different purposes

TypeUseOverlapping PlayFade Support
SOUNDShort sound effects (confirm, damage, footsteps, etc.)YesNo
BGMConstant background musicNo (replaces)Yes
METemporary staging music (victory fanfare, etc.)No (replaces, BGM paused)Yes
MAP_BGMAuto-play BGM set on the current mapNoYes
MAP_MEAuto-play ME set on the current mapNoYes

Property List ​

Item (tscn label)Input FormatDescription
TypeSelectSound type (one of SOUND / BGM / ME / MAP_BGM / MAP_ME)
SoundText + file select buttonPath to sound file (absolute path starting with res://, disabled for MAP_BGM / MAP_ME)
VolumeNumeric (%)Volume (0-100)
Fade-in TimeNumeric (seconds)Time to spend fading in (disabled for SOUND)
PLAY button-Sample-play the current setting in the editor (SOUND only)
STOP button-Stop sample playback in the editor (SOUND only)

Property Details ​

Type ​

Select the sound type from 5 options. The selection changes the input availability of other properties.

SOUND (Sound Effect) ​

  • Use: Short sound effects (confirm, cancel, damage, footsteps, sword strikes, etc.)
  • Overlapping play: Multiple of the same SOUND can be played simultaneously
  • Fade support: None (Fade-in Time field is disabled)
  • Characteristic: Does not stop other BGM / ME, just overlays sound effects

BGM (Background Music) ​

  • Use: Background music for maps and dungeons
  • Behavior: Only one track plays at a time; playing a new BGM stops the previous one
  • Fade support: Smooth transition with Fade-in Time
  • Characteristic: Loop playback (uses loop info of .ogg, or auto-loops)

ME (Music Effect) ​

  • Use: Temporary staging music (victory fanfare, level-up jingle, event opening tune, etc.)
  • Behavior: Pauses BGM, plays one ME track, and BGM auto-resumes after ME ends
  • Fade support: Fade-in Time can be specified
  • Characteristic: Only one track plays at a time; playing a new ME stops the previous one

MAP_BGM (Map's BGM) ​

  • Use: Auto-play the BGM set on the currently displayed map
  • Behavior: Automatically resolves the BGM path from map data (map_data[current].bgm)
  • Editor side: Sound input, file select button, and PLAY/STOP buttons are disabled (no individual specification needed)
  • Characteristic: Convenient for calling the BGM linked to the map, such as returning to the original map BGM after battle
  • If no BGM is set on the map: Stops the currently playing BGM (silence)

MAP_ME (Map's ME) ​

  • Use: Auto-play the ME set on the currently displayed map
  • Behavior: Automatically resolves the ME path from map data (map_data[current].me)
  • Other: Same as MAP_BGM (editor input fields disabled, silent if no ME is set on the map)

Sound ​

Specifies the path of the sound file to play.

  • Input field: Absolute path starting with res://, such as res://addons/rpg_wizard/data/sounds/decide_01.ogg
  • File select button (...) on the right: Opens the file selection dialog when pressed
    • When SOUND is selected: Under data/sounds/
    • When BGM is selected: Under data/sounds/bgm/
    • When ME is selected: Under data/sounds/me/
  • Supported formats: .wav, .mp3, .ogg
  • When MAP_BGM / MAP_ME is selected: Both input field and button are disabled (because the path is auto-resolved from map data)

Volume ​

Specifies the volume as a percentage (0-100).

  • Unit: %
  • 0: Silent
  • 100: Maximum volume
  • Out-of-range values are clamped internally
  • The final volume is determined by multiplying with the game-wide volume settings (master volumes for BGM/SE/ME)

Fade-in Time ​

Specifies the fade-in time in seconds.

  • 0: Starts immediately at normal volume
  • 1.0 etc.: Gradually increases volume over the specified seconds (natural transition for BGM / ME switch)
  • Disabled when SOUND is selected (because SOUND is instant)

PLAY / STOP Buttons ​

Buttons for sample-playing sounds within the editor to verify them.

  • Enabled only when SOUND is selected
  • Disabled when BGM / ME / MAP_BGM / MAP_ME is selected
  • Automatically stops when the property edit area is closed (selecting another event content)

Runtime Behavior ​

When this event content is executed, the following processing occurs:

1. Branching based on Type ​

  • SOUND / BGM / ME: Uses the specified Sound path as-is
  • MAP_BGM / MAP_ME:
    • Gets the path from the current map's map_data[current].bgm / map_data[current].me
    • If a path is obtained, plays it as BGM / ME (internally converted to SoundType.BGM / ME)
    • If the path is empty (nothing set on the map) -> silenced via _sound_player.stop()

2. Sound playback ​

Calls the internal _sound_player.play() function and starts playback with the specified volume and fade-in time.

3. Proceeds to next event content without waiting ​

This event content has no wait property. It proceeds to the next event content immediately upon starting playback (sound plays in the background).

If you want to wait for the sound length

If you want to wait for sound playback to complete, specify a wait manually using Wait after this event content.

4. Automatic switching of BGM / ME ​

  • Playing a new BGM stops the previous BGM (or fades the transition when Fade-in Time is specified)
  • Playing a new ME stops the previous ME; BGM is stopped while ME plays (BGM auto-resumes after ME ends)
  • SOUND supports overlapping play (previous SOUND is not stopped; new one plays on top)

Typical Usage Flows ​

Flow 1: Playing a confirm sound (sound effect) ​

On button confirmation or event trigger:

  1. Play Sound (this event content) (Type: SOUND, Sound: res://addons/rpg_wizard/data/sounds/decide_01.ogg, volume 80)

Flow 2: Playing town BGM ​

Starting BGM when entering a map:

  1. Play Sound (this event content) (Type: BGM, Sound: res://.../bgm/town.ogg, volume 70, fade-in 2.0)

Flow 3: Victory fanfare (ME) ​

Staging after winning a battle:

  1. Play Sound (this event content) (Type: ME, Sound: res://.../me/victory.ogg, volume 100)
  2. Show Text <- "Victory!"
  3. (After ME ends, BGM auto-resumes)

Flow 4: Auto-resume map BGM ​

Returning to map BGM after battle:

  1. Start Battle (battle ends)
  2. Play Sound (this event content) (Type: MAP_BGM, volume 70, fade-in 1.0)

Specifying MAP_BGM auto-resolves the BGM set on the current map, so you don't need to write different BGM for each map.

Flow 5: Overlapping multiple sound effects ​

Compound staging of sword strike -> explosion:

  1. Play Sound (this event content) (Type: SOUND, Sound: sword.wav, volume 90)
  2. Play Sound (this event content) (Type: SOUND, Sound: explosion.wav, volume 100)

Since SOUND supports overlapping play, both sounds play simultaneously.

Flow 6: Switching BGM with fade ​

Naturally fading an existing BGM into a new BGM:

  1. Play Sound (this event content) (Type: BGM, Sound: res://.../bgm/battle.ogg, fade-in 3.0)

Internally, the previous BGM stops or cross-fades briefly (depending on playback environment).

Flow 7: Impact staging (SE + screen shake + screen fade) ​

Compound staging for an explosion scene:

  1. Play Sound (this event content) (Type: SOUND, Sound: boom.wav, volume 100)
  2. Shake Screen (intensity 40, time 0.8, wait OFF)
  3. Fade Out Screen (black, time 0.3, wait ON)

Typical Combinations ​

For the overall picture, see Combination Patterns.

Sound effect + screen staging ​

Combined visual and auditory impact expression:

  1. Play Sound (this event content) (SOUND effect)
  2. Shake Screen

BGM switching (on map entry) ​

Setting mood when entering a map:

  1. Play Sound (this event content) (BGM, fade-in 2.0)
  2. Show Text <- Map narration

BGM resumption after battle ​

Returning to original map BGM after battle:

  1. Start Battle (battle ends)
  2. Play Sound (this event content) (MAP_BGM, fade-in 1.0)

Victory fanfare ​

Combination of ME + text display:

  1. Play Sound (this event content) (ME victory fanfare)
  2. Show Text <- Victory line
  3. (After ME ends, BGM auto-resumes)

Stopping sounds ​

When you want to stop BGM / ME:

  1. Stop Sound <- Specify Type and Fade-out Time
Related Event ContentUse
Stop SoundStops a playing sound
Shake ScreenScreen staging combined with impact sounds
Fade Out ScreenCombined with BGM change on scene transition
Change MapAutomatic BGM switching on map transition
Start BattleAutomatic switching to battle BGM
WaitManually wait for sound playback to complete
PageRelated Content
System Tab (Editor)BGM / SE master volume settings
Map Tab (Editor)Per-map BGM / ME settings referenced by MAP_BGM / MAP_ME
Event Content ListList of all event contents

Notes ​

Behavior differs significantly by Type ​

  • SOUND: Supports overlapping play, suitable for short sound effects
  • BGM: Only one track at a time, replacement style, suitable for long music
  • ME: Pauses BGM to play, BGM auto-resumes afterward
  • MAP_BGM / MAP_ME: Auto-resolved from map data, no need to specify path on editor side

Choose the Type according to your purpose.

SOUND has no Fade-in Time ​

Selecting the SOUND type disables Fade-in Time. SOUND cannot be faded; it plays at normal volume instantly. Specify long sounds with fade using BGM / ME.

MAP_BGM / MAP_ME is silent if not set on map ​

Even if you specify MAP_BGM / MAP_ME, if the current map does not have the respective setting, no sound is played (_sound_player.stop() is called, resulting in silence).

No wait property ​

This event content has no Is Wait property. It proceeds to the next event content immediately upon starting playback. If you want to wait for the sound length, specify a wait manually using Wait.

Volume is an integer from 0 to 100 ​

Volume input is a percentage (%) from 0 to 100. The final volume is determined by multiplying with the game-wide volume settings (master volumes for BGM/SE/ME).

Supported formats are .wav / .mp3 / .ogg ​

The filter of the file selection dialog is .wav, .mp3, .ogg. Other formats (.flac, .wma etc.) are not supported.

Non-existent file paths are passed through ​

If the specified sound path is not registered in the internal dictionary (_sound_dict), this event content plays nothing and passes through. Don't forget to verify the path.