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.

[Resolved] Issue with VX Title Screen Sound Effects by SephirothSpawn

I get this error when I don't edit the script to play a sound when you choose, New game:

Script 'Vocab' line 213: NoMethodError occurred.
undefined method 'terms' for nil:NilClass

I get this error when I edit the script to play a sound when you choose the option, New Game:

Script 'VX Title Screen Sound Effects' line 14: SyntaxError occurred.

Here is the original script.
Code:
#==============================================================================
# ** VX Title Screen Sound Effects
#------------------------------------------------------------------------------
# SephirothSpawn
# Version 1.0
# 2008-09-19
#==============================================================================

module Sound
  Title_Screen_SE = {}
  Title_Screen_SE[Vocab::new_game] = [
    # [filename, volume, pitch]
  ]
  Title_Screen_SE[Vocab::continue] = [
    # [filename, volume, pitch]
  ]
  Title_Screen_SE[Vocab::shutdown] = [
    # [filename, volume, pitch]
  ]
  def self.play_title_scene_se(command)
    array = Title_Screen_SE[command]
    item = array[rand(array.size)]
    Audio.se_play(*item) 
  end
end

class Scene_Title
  alias_method :seph_scnttlse_scnttl_ccw, :create_command_window
  alias_method :seph_scnttlse_scnttl_update, :update
  def create_command_window
    seph_scnttlse_scnttl_ccw
    @last_index = @command_window.index
  end
  def update
    seph_scnttlse_scnttl_update
    if @last_index != @command_window.index
      @last_index = @command_window.index
      c = @command_window.commands[@command_window.index]
      Audio.play_title_scene_se(c)
    end
  end
end

Here is the script, modified to play the sounds I want.
Code:
#==============================================================================
# ** VX Title Screen Sound Effects
#------------------------------------------------------------------------------
# SephirothSpawn
# Version 1.0
# 2008-09-19
#==============================================================================

module Sound
  Title_Screen_SE = {}
  Title_Screen_SE[Vocab::new_game] = [
    # [filename, volume, pitch]
    ['areyouafraid', 100, 100]
    ['Let us begin', 100, 100]
    ['thisworld', 100, 100]
  ]
  Title_Screen_SE[Vocab::continue] = [
    # [filename, volume, pitch]
  ]
  Title_Screen_SE[Vocab::shutdown] = [
    # [filename, volume, pitch]
  ]
  def self.play_title_scene_se(command)
    array = Title_Screen_SE[command]
    item = array[rand(array.size)]
    Audio.se_play(*item) 
  end
end

class Scene_Title
  alias_method :seph_scnttlse_scnttl_ccw, :create_command_window
  alias_method :seph_scnttlse_scnttl_update, :update
  def create_command_window
    seph_scnttlse_scnttl_ccw
    @last_index = @command_window.index
  end
  def update
    seph_scnttlse_scnttl_update
    if @last_index != @command_window.index
      @last_index = @command_window.index
      c = @command_window.commands[@command_window.index]
      Audio.play_title_scene_se(c)
    end
  end
end

Here is a list of my scripts that deal with sound:

VX Title Screen Sound Effects -SephirothSpawn
SG Start of Turn Sound          -sandgolem
[RMVX] Lomexi's Battle Theme Adjuster -Lomexi
Fade Battle End ME                -Kylock

It might be a compatibility issue. Can anyone help?
 

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