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.

Start game sound?

Its there a way i can make a sound when the player push the start bottom in the main screan?

hmm...
if you know Residint Evil
when u push at start game u get a sound saying: RESIDINT EVIL

(who don't know the game btw)

i hope u guyz give me some scripts for somthing i can do it
 

khmp

Sponsor

Code:
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs title screen processing.
#==============================================================================

class Scene_Title
  #--------------------------------------------------------------------------
  # * Alias Methods
  #--------------------------------------------------------------------------
  alias_method :xdbx_soundonstart_scene_title_command_new_game, :command_new_game
  #--------------------------------------------------------------------------
  # * Command: New Game
  #--------------------------------------------------------------------------
  def command_new_game
    xdbx_soundonstart_scene_title_command_new_game
    # Where filename is the name of the sound file in the Audio/BGS/ folder.
    $game_system.bgs_play(RPG::AudioFile.new('filename', 100, 100))
  end
end

For script installation instructions refer to: RGSS FAQ

Good luck with it XDarknessBoyX! :thumb:
 

khmp

Sponsor

@razendnomar

Yup you're getting the hang of things. No need to override Scene_Title.command_new_game if we only need to add a line to the end of it. In this case thankfully we can use an alias.

@XDarknessBoyX

I have no idea where the sound file you want is. I was hoping you would. :wink: In the code I put a comment saying you need to replace the string filename with whatever the filename of the sound you are trying to play is. Just make sure the sound file, whatever name it might be, is placed in yourproject/Audio/BGS/.

Good luck with it XDarknessBoyX! :thumb:
 
@Khmp:

Still I don't get what this line means. Could you explain it for me, or do I need to post it in the special support sticky?
Code:
 alias_method :xdbx_soundonstart_scene_title_command_new_game, :command_new_game

btw: Have you looked at my redone part of the script I made for Brody?
 

khmp

Sponsor

My apology. Replace the code I gave you previously with this code below. Move the sound file from the BGS directory to SE directory. I got them confused somehow.

Code:
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs title screen processing.
#==============================================================================

class Scene_Title
  #--------------------------------------------------------------------------
  # * Alias Methods
  #--------------------------------------------------------------------------
  alias_method :xdbx_soundonstart_scene_title_command_new_game, :command_new_game
  #--------------------------------------------------------------------------
  # * Command: New Game
  #--------------------------------------------------------------------------
  def command_new_game
    xdbx_soundonstart_scene_title_command_new_game
    # Where filename is the name of the sound file in the Audio/BGS/ folder.
    $game_system.se_play(RPG::AudioFile.new('filename', 100, 100))
  end
end

Volume I set to a 100, the max, so if you want it louder. I think you will need to actually edit the audio file. But I don't know enough about audio to go much further than telling you that.

Good luck with it XDarknessBoyX! :thumb:
 
Oke oke, it's your thing though ;)
I'm just saying I didn't do anything. I just said one of the few things I knew about it (but that's because Khmp showed me in an other topic XD ), but I'm glad that I helped, but still, watch your back, beceause I'm sneaking up on you!! :)
 

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