RPG Maker Forums

Can somebody help me with my script? I am trying to make it to where the game will wait for user input on the keyboard before going to the next line, but I haven't found anything. This is what the part that needs to wait for user input looks like:

def exit_command @window = New_Text_Creator.new @window.change_text("Are you sure you want to exit?") #line that needs to wait for user input add_command("Yes", :exit) add_command("No", :cancel) end
I have tried plenty of methods, but none have worked. This is what I've tried:

def exit_command @window = New_Text_Creator.new @window.change_text("Are you sure you want to exit?") Input.press?:)CTRL) #control is one of the constants used by Input.press? add_command("Yes", :exit) add_command("No", :cancel) endend
Code:
  def exit_command    @window = New_Text_Creator.new    @window.change_text("Are you sure you want to exit?")    if Input.press?(:CTRL)    add_command("Yes",  :exit)    add_command("No",   :cancel)  endend
Code:
  def exit_command    @window = New_Text_Creator.new    @window.change_text("Are you sure you want to exit?")    if Input.press?(:CTRL)    do    add_command("Yes",  :exit)    add_command("No",   :cancel)  endend
Code:
  def exit_command    @window = New_Text_Creator.new    @window.change_text("Are you sure you want to exit?")    case BUTTON    when Input.press?(:CTRL)    add_command("Yes",  :exit)    add_command("No",   :cancel)  endend
Code:
  def exit_command    @window = New_Text_Creator.new    @window.change_text("Are you sure you want to exit?")    yield until Input.press?(:CTRL)    add_command("Yes",  :exit)    add_command("No",   :cancel)  endend
If anyone knows a better way to make it wait for user input on the keyboard (or any way at all), then could you please tell me how to make my script wait!? I'm sure it isn't really that hard, but I haven't been able to figure it out, so any help would be appreciated!

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,050
Messages
1,018,548
Members
137,835
Latest member
yetisteven
Top