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.

An info-bar

I'm cooking up a custom menu, and I want to have a info-bar at the top of the screen. Info bar being when you hover over items, it's text will change to "Info: From here you can use items." and if you hover over equip, "Info: From here you can change a selected heroe's armor or weapons." See what I mean?

I can't figure out how to do it though. Help?
 
Add a help window object..

@help_window = Window_Help.new

then add this to your update method:

Code:
case @command_window.index
when 0 # Item
  @help_window.set_text('Info: From here you can use items.')
when 1 # Skills
  @help_window.set_text('Info: From here you can use skills.')
when 2 # Equipment
  @help_window.set_text('Info: From here you can change equipment.')
when 3 # Status
  @help_window.set_text('Info: From here you can view character status.')
when 4 # Save
  @help_window.set_text('Info: From here you can save your game.')
when 5 # End Game
  @help_window.set_text('Info: From here you can quit the game.')
end

The above code is for the default menu system. You may need to make edits for it to work within yours.
 
Ah... sorry it took me so long to respond. Alright, I did what you said, and I'm not getting any errors, the text is just not showing up. This is what it looks like right now:

Code:
class Window_Info < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    @help_window = Window_Help.new
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
case @command_window.index
when 0 # Item
  @help_window.set_text('Info: From here you can use items.')
when 1 # Skills
  @help_window.set_text('Info: From here you can use skills.')
when 2 # Equipment
  @help_window.set_text('Info: From here you can change equipment.')
when 3 # Status
  @help_window.set_text('Info: From here you can view character status.')
when 4 # End Game
  @help_window.set_text('Info: From here you can quit the game.')
end
end
end
And later on...
Code:
@help_window = Window_Help.new
    @help_window.x = 40
    @help_window.y = 40
And...
Code:
#--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @playtime_window.update
    @gold_window.update
    @status_window.update
    @help_window.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
      return
    end
    # If status window is active: call update_status
    if @status_window.active
      update_status
      return
    end
  end
I would imagine that that is all you need to figure out how to fix this.
 
x_x

You don't need to create a Window_Info.

The case block of code I gave you goes in the update method of Scene_Menu, and in the 'main' section you need to initialize a window called @help_window by doing @help_window = Window_Help.new
 

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