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.

how do i call a music file in RGSS2

ok, this is a big noob question,
i  forgot how to play a specific music from the BGM/ music folder i know it's only one line of code but i forgot
as i need to add a line so it plays BGM in my script, as i got a credits script but it's silent.
thanks
 
Audio.bgm_play("Audio/BGM/" + bgm.name, bgm.volume, bgm.pitch)

For future reference, All of the classes are defined in the docs. (Help -> Contents) or (F1)

And, you can search ALL scripts with (Cntl - Shift - F)

Be Well
 
Bad Brew! Bad!  We NEVER call Audio methods directly!  In RGSS2, we use this:
Code:
RPG::BGM.new('name', volume, pitch).play

This invokes RPG::BMG's "remember last BGM played" bit.
 

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