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.
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.
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.