Separate Sounds for Menu Scene
#1
Hi all! A very happy Monday to you :D

I was wondering if different sounds could be specified in the menu scene, and item scene scripts for the cursor, cancel and decision.
I don't want to use those specified in the system, and "window selection". I want them to be different than the other generic choice selection boxes in the game, and stuff.

I tried copying the SE playing bits from Window Selection, and using them in "Scene_Menu", but they didn't change anything. I even tried copying the whole "Window Selection" script and altering it!! ...But that lead to errors, and probably wasn't a good idea. So I stopped fooling with that   Laughing + Tongue sticking out

I also tried using this FancyChoices [link] (should be named "FancyKhoices") script from Kyonides, which *seems* like it may use different sounds for the choice options, but when I edited that bit, it didn't change the sounds.

Anywho! I hope someone can help :D I can explain more if anything isn't clear. Thank you, to any possible replies <3 Blushing + Cheery

EDIT: 
Ah! Okay, for some reason it seems that the choices script effects left/right movements, but not up/down ones.
EDIT2:
I tried to add the call to play the audio for all movements, but now *both* the system audio and my system audio play. Okay, this isn't right I don't think lol

EDIT3:
AH! I THINK I FIGURED IT OUT!

In "window_selectable" under line 140, I just added an "if" statement for the cursor!

Code:
          # Move cursor down
          if $scene.is_a?(Scene_Menu)                    #<-------
            Audio.se_play("Audio/SE/ba", 100, 50)        #<-------
            @index = (@index + @column_max) % @item_max  #<-------
          else
          $game_system.se_play($data_system.cursor_se)
          @index = (@index + @column_max) % @item_max
        end
      end
    end

And I'll just repeat that for each direction...
I hope this won't cause any problems later  Happy with a sweat But it looks good to me!! Maybe this can help someone else too ;D
૮₍ ´• ˕ •` ₎ა
Games Projects
(╭☞ ͡ ͡°͜ ʖ ͡ ͡°)╭☞
Reply
#2
I have you one that might be a little more... fun.

Code:
          # Move cursor down

          # We branch on each type of 'Scene'
          case $scene
          when Scene_Menu ; $game_system.se_play($data_system.shop_se)
          when Scene_Equip ; $game_system.se_play($data_system.escape_se)
          else ; $game_system.se_play($data_system.cursor_se)
          end
         
          @index = (@index + @column_max) % @item_max
Here, I put use the CASE...END block

Each time it runs, it checks what type of $scene is running, ergo:  when (THIS) ; SE_play this  Laughing

But the last part of the case block is the 'else' ... in here basically saying "I got nothing else, do the default fx"

Do know that your option to change SFX based on the SCENE is interesting, but... 

You do get the same audio cues in both  windows within Scene_Equip, the window where you can see what you have equipped and can remove, and the window at the bottom where you can choose replacements.  So let's expand that, shall we????

First, add either:
Code:
class Scene_Equip
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :right_window             # Currently equipped gear window
end
or
Code:
class Scene_Equip
  #--------------------------------------------------------------------------
  # * Get the Right Window data
  #--------------------------------------------------------------------------
  def right_window
    @right_window
  end
end
I would prefer a separate outside script rather than direct inserts.  That way, you can find such changes with more ease. Direct edits to the default scripts are usually the last straw in the opinion of seasoned scripters.

The 'Right Window' instance variable in Scene_Equip is essentially the selectable display window of what you have equipped.  And  it is essentially NOT designed to give any information outside of Scene_Equip.  For that, you need to have SOME means to read this thing outside of the Scene_Equip class.

But with THAT out of the way (and inserted), consider THIS tidbit:
Code:
          # Move cursor down

          # We branch on each type of 'Scene'
          case $scene
         
            # If we branch on the main menu
            when Scene_Menu
              $game_system.se_play($data_system.shop_se)
             
            # If we branch on the Equip Menu
            when Scene_Equip
              # We decide if its the gear menu or not
              if $scene.right_window.active == true
                $game_system.se_play($data_system.escape_se)
              else
                $game_system.se_play($data_system.load_se)
              end
           
            # If we branch on any OTHER menu...
            else
            $game_system.se_play($data_system.cursor_se)
            #
          end
         
          @index = (@index + @column_max) % @item_max

I broke it down in a more plebian style to make it more digestible.  Do note in the center area how I added:
Code:
              # We decide if its the gear menu or not
              if $scene.right_window.active == true
                $game_system.se_play($data_system.escape_se)
              else
                $game_system.se_play($data_system.load_se)
              end
It allows for different audio depending on WHICH window you are in within Scene_Equip.  And it would not be possible to test that window without the prior inclusions I noted above.

This covers the use of SFX that are defined by the $game_system.se_play($data_system.AUDIO HERE) command.  You could go more advanced by setting up other SFX outside whats covered in the System class.  

[Image: Screen%20Shot%202023-04-09%20at%207.24.27%20PM.jpeg]
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
   Parts of the Equip, Spells, and Status menus persist even after exiting the menu Ace_V 5 4,199 12-29-2024, 06:09 AM
Last Post: Ace_V
   Plugin or Script help with Item menu, SKill menu, and Equip menu JayRay 3 3,359 11-22-2024, 07:02 PM
Last Post: JayRay
   Need help with my menu - Current issue is item grid layout LilyFrog 41 54,542 09-24-2018, 02:03 AM
Last Post: LilyFrog
   Special Items Separate Menu Diorm 41 59,049 02-10-2018, 06:06 PM
Last Post: Diorm
   using $scene during battles Keeroh 5 12,251 01-17-2018, 04:31 PM
Last Post: Keeroh
Question  Mog Menu script: help me stop the crazy picture movement during transitions Zachariad 4 13,130 05-31-2017, 05:10 AM
Last Post: Zachariad
Sad  Equip bug (1-scene CMS) Whisper 2 7,642 01-23-2017, 09:20 AM
Last Post: Whisper
   A fourth column in MOG Scene Item Laura V1.2 Noctis 13 27,131 11-27-2016, 05:12 PM
Last Post: DerVVulfman
   XAIL MENU from RPG VX ACE to RPG XP RASHIDA12 46 72,164 05-02-2016, 08:08 PM
Last Post: RASHIDA12
Tongue  Healing Spell doesn't work right in Menu? Bounty Hunter Lani 8 16,538 01-15-2015, 07:45 PM
Last Post: Bounty Hunter Lani



Users browsing this thread: 1 Guest(s)