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.

Two Simple Questions (Should be added to FAQ)

Question #1

How do you call a BGM to play in an event?

I know the syntax to play some kind of music, like $game_system.bgm_play($data_system.title_bgm), which I saw in another script, but I couldn't get it to work when I tried...

$game_system.bgm_play("001-Battle01")

I even tried...

$game_system.bgm_play('001-Battle01', '100', '100')

Because I know the script might want the extra information...

Even...

$game_system.bgm_play(RPG::AudioFile['001-Battle01', 100, 100])

But nada. I've gotten lost in the Help file too for this stupid syntax.

Question #2

When you do have the opprotunity to call BGM name, volume, pitch, what exactly does the syntax have to be, and does the '#' or the "#" matter around the numeric values?

I'm actually setting these with public access variables, so it would be called bgm_play(@bgm_name, @bgm_v, @bgm_p) based off of what I put in the top of the script. Would the '#' and/or "#" matter when defining those as variables?

I'm not a newb scripter, believe it or not I've made a few here 'n there before, but it always comes to the simplest crap to get me stuck!
 

khmp

Sponsor

You were close with the 3rd try:
Code:
$game_system.bgm_play(RPG::AudioFile.new('001-Battle01'))

If the volume and pitch stay at 100 you can omit them.

Good luck with it Kain Nobel! :thumb:
 

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