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.

Text Boxes Help

Hello, again! ^_^;

In my game, we have created a battle-menu using events (we are using an ABS). When one cycles through the menu, we want a text box to appear and tell the player what the icon is/does. The problem is, the game requires that you push ENTER, or C, in order to proceed and we want it so the player can just go through the menu without having to push ENTER each time just to continue to the next icon.

Does anyone have any ideas/suggestions? I'm assuming you would need a script - which is why I posted this here.

Thanks in advance! XD

(I hope this makes sense)
 
well, you could pass me your demo and i have a look on it.

but, you could try this
call a variable menu_pos or whatever

okey, i show you how i would do it: (for commands: Item, Skill, Status, Equip) easy to extend

Code:
a variable MENUPOS = 0

loop

 # now the icons must appear or become bigger or whatever, i decide now for this small example to make it bigger

  #  and let a text appear and disappear when not selected

  if MENUPOS is 0

    PICTURE ITEMICON zoom 150 in 20 frames

    PICTURE ITEMTEXT opacity 255 in 20 frames

    # all other Pictures get back to their idle state

    PICTURE SKILLICON zoom 100 in 20 frames

    PICTURE SKILLTEXT opacity 0 in 20 frames

    PICTURE STATUSICON zoom 100 in 20 frames

    PICTURE STATUSTEXT opacity 0 in 20 frames

    PICTURE EQUIPICON zoom 100 in 20 frames

    PICTURE EQUIPTEXT opacity 0 in 20 frames

  end

  if MENUPOS is 1

    PICTURE SKILLICON zoom 150 in 20 frames

    PICTURE SKILLTEXT opacity 255 in 20 frames

    # all other Pictures get back to their idle state

    PICTURE ITEMICON zoom 100 in 20 frames

    PICTURE ITEMTEXT opacity 0 in 20 frames

    PICTURE STATUSICON zoom 100 in 20 frames

    PICTURE STATUSTEXT opacity 0 in 20 frames

    PICTURE EQUIPICON zoom 100 in 20 frames

    PICTURE EQUIPTEXT opacity 0 in 20 frames

  end

  if MENUPOS is 2

    PICTURE STATUSICON zoom 150 in 20 frames

    PICTURE STATUSTEXT opacity 255 in 20 frames

    # all other Pictures get back to their idle state

    PICTURE ITEMICON zoom 100 in 20 frames

    PICTURE ITEMTEXT opacity 0 in 20 frames

    PICTURE SKILLICON zoom 100 in 20 frames

    PICTURE SKILLTEXT opacity 0 in 20 frames

    PICTURE EQUIPICON zoom 100 in 20 frames

    PICTURE EQUIPTEXT opacity 0 in 20 frames

  end

  if MENUPOS is 3

    PICTURE EQUIPICON zoom 150 in 20 frames

    PICTURE EQUIPTEXT opacity 255 in 20 frames

    # all other Pictures get back to their idle state

    PICTURE ITEMICON zoom 100 in 20 frames

    PICTURE ITEMTEXT opacity 0 in 20 frames

    PICTURE SKILLICON zoom 100 in 20 frames

    PICTURE SKILLTEXT opacity 0 in 20 frames

    PICTURE STATUSICON zoom 100 in 20 frames

    PICTURE STATUSTEXT opacity 0 in 20 frames

  end

  # the selected command is now grown bigger and has a title on it

  button input on a new variable, let's call it INPUT 

  if INPUT is 6

    MENUPOS + 1

  end

  if INPUT is 4

    MENUPOS - 1

  end

  # correct the menupos if it's out of command list range

  if MENUPOS is smaller than 0

    MENUPOS = 3 # the fourth and last command EQUIP

  end

  if MENUPOS is greater than 3

    MENUPOS = 0

  end

  if INPUT is 13 # confirm

    # you can simply break the loop, because you have INPUT and MENUPOS

    # which configure everything further

    break loop

  end

  if Input is 12 # cancel

    break loop

  end

repeat loop

if INPUT is 13 # confirm

  if MENUPOS is 0 # item

    # call another common event that handles the item menu

  end

  if MENUPOS is 1 # skill

    # call another common event that handles the skill menu

  end

  if MENUPOS is 2 # status

    # call another common event that handles the status menu

  end

  if MENUPOS is 3 # equip

    # call another common event that handles the equip menu

  end

end

if INPUT is 12

  # do whatever you want to exit the menu

end
 
Wow, that was confusing. O.o

We are not using pictures ("show picture") for the icons, but actual events with the icons being "character sets". ^_^;

They appear above the player in a row (Item/Abilities/Equip/Tactics/Run). We tried to use "show text" and have the text box appear right on top of the icon, but we couldn't move to the next icon ("character set") without pushing ENTER first. We want to make it so we don't need to push ENTER to go the next icon. We want it so the player can go through the menu (icons) using left and right with text (boxes) appearing above the icon. O.o

I hope that made more sense. XD
 
I think his point was to use pictures for the 'help text' rather than message windows.
That way you have control over when they are removed.

OR, you could use the built-in help window like this...

To create the window (when you enter your menu), use the Script command:

  • @help_window = Window_Help.new

To add/change the text in the window...

  • @help_window.set_text("Text")

And to close the window when you're done...

  • @help_window.dispose
 

Star

Sponsor

Hey Brew. I tried this for my game. It seems really cool but sometimes I get an error when I use @help_window.dispose. And it also doesn't dispose fast enough. Maybe I'm doing it wrong?
 
Okies, here's our event code: XD

Event1.png


Event2.png


Event3.png
 

Star

Sponsor

Caldaron":2lom4bgh said:
you only may once dispose and this whe your really exiting the scene, otherwise use @help_window.opacity = 0 and if you want it to show up again, make it 255 again
Thanks for your help guys
I tried that out and I got a no method error. Unless there's a way to make the Help Window have a method using the Opacity, I don't think that way is gonna work.

The only reason why I need to dispose so much is because the help windows overlap each other and it only fixes itself in like 3 seconds. I'm trying to make a help display for an on field menu using events kinda like a ring menu but not in a ring
 

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