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.

Adding a BGS to your title

Hello, I'm new to RPG Maker XP and I don't know much about scripts. What I'm wondering is what do you need to do to the title script to have a BGS play?
 
Add this to Scene_Title Method main after this line

Code:
    # Play title BGM
    $game_system.bgm_play($data_system.title_bgm)

$game_system.bgs_play(RPG::AudioFile.new(file, volume, pitch))

where file is the filename of the bgs you want to play
volume is the volume
and pitch is the pitch
(you can leave volume and pitch off if you want)
 
Trickster said:
Add this to Scene_Title Method main after this line

Code:
    # Play title BGM
    $game_system.bgm_play($data_system.title_bgm)

$game_system.bgs_play(RPG::AudioFile.new(file, volume, pitch))

where file is the filename of the bgs you want to play
volume is the volume
and pitch is the pitch
(you can leave volume and pitch off if you want)

Ah, thank you very much ^_^
 
Trickster said:
Add this to Scene_Title Method main after this line

Code:
    # Play title BGM
    $game_system.bgm_play($data_system.title_bgm)

$game_system.bgs_play(RPG::AudioFile.new(file, volume, pitch))

where file is the filename of the bgs you want to play
volume is the volume
and pitch is the pitch
(you can leave volume and pitch off if you want)
I just tried the code you gave me. The BGS doesn't play when I'm at the title screen.
 
lets see now that should have given you the error

Uninitialized constant Wave for Scene_Title
or something like that

Here must put it in "" making it a string so here is the correct version
Code:
$game_system.bgs_play(RPG::AudioFile.new("Wave"))

and that should work if you need any help or have any trouble then reply and I'll answer your question
 
Actually you should have, do you have any custom scripts in your project that modify Scene_Title method main

move the code after this line (I'm getting tired and messed this line that stops the BGS)

Code:
    Audio.bgs_stop
 

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