[VX ACE] Slight delay before opening other windows in the menu?

Hi, I was wondering if there is something that I could add into the Scene_Menu (or any script in the game) that makes the game wait n frames before opening other windows in the menu?
For example, when I press X to bring out the menu, I'd like the game to wait 5 frames before opening the gold window, then another 5 frames before opening the menu status window. (Instead of bringing them all up at once)

I tried modifying the first several lines in Scene_Menu:
Spoiler
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
def start
super
create_command_window
wait(5)
create_gold_window
wait(5)
create_status_window
end

def wait(duration)
duration.times { Fiber.yield } #<-- this is line 20
end
but it only brings out an error when I try to open up the menu (Script 'Scene_Menu' line 20: FiberError occurred. Can't yield from root fiber)

I also tried adding in Graphics.wait(5) instead of wait(5) but all it does is make the game wait 10 frames before opening all the windows at once.

Any help is greatly appreciated!! 😍
(I apologize in advance for any grammar mistakes I might have made) 😢
This might be what you want. it has a slight pause between each window, but you may have to play with it to get it to do a specific order.
http://www.rpgmakercentral.com/topic/423-nasty-animated-main-menu/
You gotta learn what Fiber.yield actually do before blindly taking them from Game_Interpreter to your scene. But that would be a quite long lecture

Btw, when I'm going to put some "wait". I usually do
Code:
Graphics.update
Input.update
Give it a try
The place where you try to add the waiting time is your problem.
The graphics are frozen there, so nothing you make there will affect the screen directly until the graphics are unfrozen.
That happens in the perform_transition method of the scene class, which happens in the post_start method of the scene.
You can setup the initial values of your graphical objects in the start method (which is what every default script does).
Than you move on to the post_start method, setup your waiting times there and change your graphical objects there however you want.

For example, close all windows in the start method (you might also need to deactivate the command windows too, I don't remember much about these window classes ).
Now move to the post_start method (to the end of it) and start opening them, placing a waiting time before each of the opening lines.
A simple Graphics.wait(X) works if you only want to update the screen during these waiting times.
And this should be it, if you really just want to add some waiting time between their opening animations.

Here is an example code for the main menu:
Spoiler
Code:
class Scene_Menu

  alias close_them_wins7772 start
  def start
    close_them_wins7772
    close_the_windows
  end
 
  def close_the_windows
    # Closing all windows before the transition happens
    instance_variables.each do |vkey|
      obj = instance_variable_get(vkey)
      obj.openness = 0 if obj.is_a?(Window)
    end
  end
 
  alias open_them_wins7741 post_start
  def post_start
    open_them_wins7741
    open_the_windows
  end
 
  def open_the_windows
    # Getting all window objects
    wins = []
    instance_variables.each do |vkey|
      obj = instance_variable_get(vkey)
      wins << obj if obj.is_a?(Window)
    end
    # Opening all windows after the transition
    wins.each do |win|
      win.open
      until win.open?
        win.update
        Graphics.update
      end
      # This unless check is why we pre-collected all windows above
      Graphics.wait(10) unless win == wins[-1]
    end
  end
 
end
It will account for all window objects automatically. Other graphical objects are not affected though.
This might be what you want. it has a slight pause between each window, but you may have to play with it to get it to do a specific order.
http://www.rpgmakercentral.com/topic/423-nasty-animated-main-menu/
Thank you for this, I just tested this a while ago and it actually has the delay I want, but, yeah, I think I might have to make slight adjustments to the script if I'd want it to work the way I want to. 😊

You gotta learn what Fiber.yield actually do before blindly taking them from Game_Interpreter to your scene. But that would be a quite long lecture
Time to watch tutorials, I guess 😢

The place where you try to add the waiting time is your problem.
The graphics are frozen there, so nothing you make there will affect the screen directly until the graphics are unfrozen.
That happens in the perform_transition method of the scene class, which happens in the post_start method of the scene.
You can setup the initial values of your graphical objects in the start method (which is what every default script does).
Than you move on to the post_start method, setup your waiting times there and change your graphical objects there however you want.

For example, close all windows in the start method (you might also need to deactivate the command windows too, I don't remember much about these window classes ).
Now move to the post_start method (to the end of it) and start opening them, placing a waiting time before each of the opening lines.
A simple Graphics.wait(X) works if you only want to update the screen during these waiting times.
And this should be it, if you really just want to add some waiting time between their opening animations.

Here is an example code for the main menu:
Spoiler
Code:
class Scene_Menu

  alias close_them_wins7772 start
  def start
    close_them_wins7772
    close_the_windows
  end
 
  def close_the_windows
    # Closing all windows before the transition happens
    instance_variables.each do |vkey|
      obj = instance_variable_get(vkey)
      obj.openness = 0 if obj.is_a?(Window)
    end
  end
 
  alias open_them_wins7741 post_start
  def post_start
    open_them_wins7741
    open_the_windows
  end
 
  def open_the_windows
    # Getting all window objects
    wins = []
    instance_variables.each do |vkey|
      obj = instance_variable_get(vkey)
      wins << obj if obj.is_a?(Window)
    end
    # Opening all windows after the transition
    wins.each do |win|
      win.open
      until win.open?
        win.update
        Graphics.update
      end
      # This unless check is why we pre-collected all windows above
      Graphics.wait(10) unless win == wins[-1]
    end
  end
 
end
It will account for all window objects automatically. Other graphical objects are not affected though.
It now works the way I want it to! Thank you soooo much!😍
This thread can be closed now! 👋

Original thread: https://forums.rpgmakerweb.com/threads/vx-ace-slight-delay-before-opening-other-windows-in-the-menu.87575/