Delay "Title Commands"

Hello, I'm trying to figure out if it's possible to delay/or wait for a certain period of time before allowing the

command window for the title screen to appear?

I'm using a "Map as Title Screen" script, and I have quite a few animations for it.
However, I want to NOT show the title commands until after a certain point.
(You know, a build up moment before you select New Game, etc.)


I been messing around with this section.

Code:
  def create_command_window    @command_window = Window_TitleCommand.new    @command_window.set_handler(:new_game, method(:command_new_game))    @command_window.set_handler(:continue, method(:command_continue))    @command_window.set_handler(:shutdown, method(:command_shutdown))  end
And I tried adding things like "wait(400)" but it doesn't work, I just get an error.
 
Wait AFAIK is only on Game_Interpreter thats why it errors...

You'd probably want to mess with the refresh or update method of the scene, add a counter which counts +1 every time. Them once it reaches 400 show the commands. And of course make sure it doesnt create the window right on start
Which "Map as title screen" script are you using? There are several scripts where you need to manually call the title command before they appear, those might be better for you.

Anyway, even if you need that specific one, we need to see its coding before we can tell you how to change it - pleaser link to the website where you got the script.
Which "Map as title screen" script are you using? There are several scripts where you need to manually call the title command before they appear, those might be better for you.

Anyway, even if you need that specific one, we need to see its coding before we can tell you how to change it - pleaser link to the website where you got the script.
I'm using this one.

http://forums.rpgmakerweb.com/index.php?/topic/10202-map-as-title-screen/

I'm using the Map as Title only, not Yami's Decorate.

I also tried this basic one too.

(Forgot how to add Spoilers...)

Code:
=begin============================================================================== ** Map Title Author: Hime Date: May 23, 2012------------------------------------------------------------------------------ ** Change log May 23   -Initial release------------------------------------------------------------------------------ Uses a game map as the title background===============================================================================end$imported = {} if $imported.nil?$imported["Tsuki_MapTitle"] = true#==============================================================================# ** Configuration. #==============================================================================module Map_Title  Start_Map = 1  Start_X = 20  Start_Y = 10end#==============================================================================# ** Rest of the script. #==============================================================================class Scene_Title < Scene_Base  #--------------------------------------------------------------------------  # * re route  #--------------------------------------------------------------------------  def start    SceneManager.call(Scene_MapTitle)  end    def terminate  endend  class Scene_MapTitle < Scene_Map  include Map_Title    def start    $game_map.setup(Start_Map)    $game_player.center(Start_X, Start_Y)    $game_player.make_encounter_count    super        Graphics.freeze    create_background    create_foreground    create_command_window    play_title_music  end    def update    update_basic    $game_map.update(true)    @spriteset.update    update_scene if scene_change_ok?  end    #--------------------------------------------------------------------------  # * Get Transition Speed  #--------------------------------------------------------------------------  def transition_speed    return 20  end  #--------------------------------------------------------------------------  # * Termination Processing  #--------------------------------------------------------------------------  def terminate    super    SceneManager.snapshot_for_background    dispose_background    dispose_foreground  end  #--------------------------------------------------------------------------  # * Create Background  #--------------------------------------------------------------------------  def create_background    @sprite1 = Sprite.new    #@sprite1.bitmap = Cache.title1($data_system.title1_name)    @sprite2 = Sprite.new    #@sprite2.bitmap = Cache.title2($data_system.title2_name)    center_sprite(@sprite1)    center_sprite(@sprite2)  end  #--------------------------------------------------------------------------  # * Create Foreground  #--------------------------------------------------------------------------  def create_foreground    @foreground_sprite = Sprite.new    @foreground_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height)    @foreground_sprite.z = 100    draw_game_title if $data_system.opt_draw_title  end  #--------------------------------------------------------------------------  # * Draw Game Title  #--------------------------------------------------------------------------  def draw_game_title    @foreground_sprite.bitmap.font.size = 48    rect = Rect.new(0, 0, Graphics.width, Graphics.height / 2)    @foreground_sprite.bitmap.draw_text(rect, $data_system.game_title, 1)  end  #--------------------------------------------------------------------------  # * Free Background  #--------------------------------------------------------------------------  def dispose_background    #@sprite1.bitmap.dispose    @sprite1.dispose    #@sprite2.bitmap.dispose    @sprite2.dispose  end  #--------------------------------------------------------------------------  # * Free Foreground  #--------------------------------------------------------------------------  def dispose_foreground    @foreground_sprite.bitmap.dispose    @foreground_sprite.dispose  end  #--------------------------------------------------------------------------  # * Move Sprite to Screen Center  #--------------------------------------------------------------------------  def center_sprite(sprite)    #sprite.ox = sprite.bitmap.width / 2    #sprite.oy = sprite.bitmap.height / 2    sprite.x = Graphics.width / 2    sprite.y = Graphics.height / 2  end  #--------------------------------------------------------------------------  # * Create Command Window  #--------------------------------------------------------------------------  def create_command_window    @command_window = Window_TitleCommand.new    @command_window.set_handler(:new_game, method(:command_new_game))    @command_window.set_handler(:continue, method(:command_continue))    @command_window.set_handler(:shutdown, method(:command_shutdown))  end  #--------------------------------------------------------------------------  # * Close Command Window  #--------------------------------------------------------------------------  def close_command_window    @command_window.close    update until @command_window.close?  end  #--------------------------------------------------------------------------  # * [New Game] Command  #--------------------------------------------------------------------------  def command_new_game    DataManager.setup_new_game    close_command_window    fadeout_all    $game_map.autoplay    SceneManager.goto(Scene_Map)  end  #--------------------------------------------------------------------------  # * [Continue] Command  #--------------------------------------------------------------------------  def command_continue    close_command_window    SceneManager.call(Scene_Load)  end  #--------------------------------------------------------------------------  # * [Shut Down] Command  #--------------------------------------------------------------------------  def command_shutdown    close_command_window    fadeout_all    SceneManager.exit  end  #--------------------------------------------------------------------------  # * Play Title Screen Music  #--------------------------------------------------------------------------  def play_title_music    $data_system.title_bgm.play    RPG::BGS.stop    RPG::ME.stop  endend
By default, the transition speed time between scenes can be set if your title is using a scene of its own.

But since you use a map as the scene, starting a game will bring you to the same map scene as well.

So the transition speed won't do you any good here.

Changing that will effect a time lag every time you load a map scene. And that means changing from menu to map as well.

So i won't be recommending that.

edit:

If you mean to hide the title window and show it later.

def create_command_window  @command_window = Window_TitleCommand.new  @command_window.set_handler🙂new_game, method🙂command_new_game))  @command_window.set_handler🙂continue, method🙂command_continue))  @command_window.set_handler🙂shutdown, method🙂command_shutdown))  @command_window.hide.deactivate #add this lineendthen change your update method to this: (500 = the count in frames)

def update  update_basic  $game_map.update(true)  @spriteset.update  update_scene if scene_change_ok?  if @counter <= 500    @counter +=1  else    @command_window.show.activate  endendand add this above def start

Code:
def initialize @counter = 0end
By default, the transition speed time between scenes can be set if your title is using a scene of its own.

But since you use a map as the scene, starting a game will bring you to the same map scene as well.

So the transition speed won't do you any good here.

Changing that will effect a time lag every time you load a map scene. And that means changing from menu to map as well.

So i won't be recommending that.

edit:

If you mean to hide the title window and show it later.

def create_command_window  @command_window = Window_TitleCommand.new  @command_window.set_handler🙂new_game, method🙂command_new_game))  @command_window.set_handler🙂continue, method🙂command_continue))  @command_window.set_handler🙂shutdown, method🙂command_shutdown))  @command_window.hide #add this lineendthen change your update method to this: (500 = the count in frames)

def update  update_basic  $game_map.update(true)  @spriteset.update  update_scene if scene_change_ok?  if @counter <= 500    @counter +=1  else    @command_window.show  endendand add this above def start

def initialize @counter = 0end
I'll test it out.

While I test it, This is what I'm trying to attempt though.

ee3c45e93f68fce7b22d3684f772491f.gif


^The above image is me using a "Show Choice" window to emulate what I'm trying to do for the title window.
forgot to add the activate/deactivate line.

use the newer edited version above.
Didn't work.
I got an error 2 seconds after the game started.

b0c084c4a24f52595075b81914c430e8.png


It sent me to this line.

Code:
if @counter <= 500
did you add

def initialize @counter = 0endabove def start ?
did you add

def initialize @counter = 0endabove def start ?
Yes.

Also, I changed

"if @counter <= 500"

to

"if @counter = 500"

and it didn't get an error.

But the title's command window isn't appearing still.
that math won't work.

and if check for = is ==

the counter will continue to add + 1 until it reaches 500

then it will run to show the command window.

if you are getting no method error. that means the @counter isn't initialize properly.

and oh, just noticed there's 2 def start.

put that above the def start that's below

include Map_Title
Okay, I got it working.
But there's 1 slight problem now.

When the game first starts, the map seems to fades out, resets, and fades in once before actually starting.
the 3 parts of script change i gave you shouldn't do that.

are you sure you are replacing the def update correctly?

all the codes i gave you should be below def initialize.

and you will need to replace the existing ones.
the 3 parts of script change i gave you shouldn't do that.

are you sure you are replacing the def update correctly?

all the codes i gave you should be below def initialize.

and you will need to replace the existing ones.
Nvm, I'm an idiot.

I had the script set to Map 1(which is my Logo/Attention) scene.

I fixed it now.

Thanks for the help~
You're welcome!

Original thread: https://forums.rpgmakerweb.com/threads/delay-title-commands.46230/