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.

Event guiding

I'm currently working on a Visual Novel (full mouse support etc) and, as visual novels always are, it's mostly text based. So there's no way to enter the menu. I made a workaround, so you could actually open the menu with a message active, but once I tried to save it, an error occured. The error (I still don't know how to fix it) is not really relevant to the situation, because I figured a way to ignore this problem.

Code:
  #--------------------------------------------------------------------------
  # * Text Advancement Input
  #--------------------------------------------------------------------------
  def input_pause
    if Mouse.click?(1)#Input.trigger?(Input::C)
      self.pause = false
      if @text != nil and not @text.empty?
        new_page if @line_count >= MAX_LINE
      else
        terminate_message
      end
    end
    if Mouse.click?(2)#Input.trigger?(Input::B)
      self.pause = false
      if @text !=nil and not @text.empty?
        new_page if @line_count >= MAX_LINE
      else
        terminate_message #Message removed, no error
        $scene = Scene_Menu.new
      end
    end
  end

The line terminate_message is the workaround I found. That way it simply removes the message and goes to the next line, but before it gets a chance to do so, it opens up the menu (so no errors). But there's one small problem. What if someone just wanted to right click, look at the menu, and go back to reread what was just written? You can't, because it skips to the next command. Here's a picture to illustrate what I'm trying to do:

http://img201.imageshack.us/my.php?image=problemfb6.png

Lets say I'm at the highlighted line (So the message is already on screen). I'd press esc, which would close the message and open up the menu. If I decide to go back after that, it would move to the next line. But that's not what I want it to do. Instead, it should read the highlighted line again.

So my question is: How can I change it so a specific event on the same map the player is on, goes one command back on the active page?

Thanks in advance.
 

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