[Solved]Formation snipet

● ARCHIVED · READ-ONLY
Started by MooshraKun 6 posts View original ↗
  1. I was wondering if someone could make a little snippet to where when the formation button is selected it please a sound effect file just something where I can input the file name and when the option is selected it plays it.
  2. Like this?



    Code:
    #===============================================================================
    #
    # Formation Sound effect
    # Author: Todd
    # Date (07/24/2012)
    # Version: (1.0.0) (VXA)
    # Level: (Simple)
    # Email: Support@beacongames.com
    #
    #===============================================================================
    module TODDSEFORM
    
    #The sound effect to use
    SE = "Darkness7"
    
    end
    #==============================================================================
    # ** Scene_Menu
    #------------------------------------------------------------------------------
    # This class performs the menu screen processing.
    #==============================================================================
    
    class Scene_Menu < Scene_MenuBase
    #--------------------------------------------------------------------------
    # * Formation [OK]
    #--------------------------------------------------------------------------
    alias todd_on_formation_ok_se on_formation_ok
    def on_formation_ok
    todd_on_formation_ok_se
    Audio.se_play("Audio/SE/" + TODDSEFORM::SE, 100, 100)
    end
    end
  3. Not quite this plays a sound every time you select a character. I only want it to play a sound when the button Formation is hit.
  4. Mooshrago12 said:
    Not quite this plays a sound every time you select a character. I only want it to play a sound when the button Formation is hit.


    Code:
    class Scene_Menu < Scene_MenuBase
      FORMATION_SE = "Attack2"
      alias command_formation_sound_effect command_formation
      def command_formation
        Audio.se_play("Audio/SE/" + FORMATION_SE, 80, 100)
        command_formation_sound_effect
      end
    end
  5. Thanks Mr Bubble it works great.
  6. This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.