Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Play map default music

Try using $game_system.bgm_play(bgm)
where bgm holds three values:
bgm.file
bgm.volume
bgm.pitch
So, if you do this:
Code:
mybgm.name = "040-Dungeon06"
mybgm.volume = 80
mybgm.pitch = 100
$game_system.bgm_play(mybgm)
It should play a creepy dungeon piece at 80% volume.

You may want to include an error-check routine just to make sure the file does exist, else a crash could occur for a non-existant file.

You can also try
Code:
$game_system.bgm_memorize
to memorize the music from the field map before you change it, and then use
Code:
$game_system.bgm_restore
to restore same said music.

There are similar files for background SFX:
Code:
$game_system.bgs_memorize
$game_system.bgs_restore

Just in case, whatcha lookin' to script? Mebby it's available.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top