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!