# Callable as follows : $game_message.choice_wait = num_frame_to_wait
# or ...
# With 'choice_wait_press' set to 'true', the frame wait set by
# 'choice_wait' will be reset whenever the user presses a button.
# In this case, 'choice_wait' should be set fairly low (10 ~ 20 frames).
# $game_message.choice_wait_press = true_false
# $game_message.choice_wait = num_frame_to_wait
# Place script call before the message leading up to the choice list.
#==============================================================================
# ** Game_Message
#==============================================================================
class Game_Message
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :choice_wait # frame wait before showing choices
attr_accessor :choice_wait_press # wait until user halts input
#--------------------------------------------------------------------------
# * ALIAS - Clear
#--------------------------------------------------------------------------
unless method_defined?(:choice_f3YBEBMZ_gm_clear)
alias_method(:choice_f3YBEBMZ_gm_clear, :clear)
end
def clear(*args, &block)
choice_f3YBEBMZ_gm_clear(*args, &block)
# Change values to set default for all choice inputs
@choice_wait = 0
@choice_wait_press = false
end
end # Game_Message
#==============================================================================
# ** Window_ChoiceList
#==============================================================================
class Window_ChoiceList < Window_Command
#--------------------------------------------------------------------------
# * ALIAS - Object Initialization
#--------------------------------------------------------------------------
unless method_defined?(:choice_UvZVkywt_wcl_initialize)
alias_method(:choice_UvZVkywt_wcl_initialize, :initialize)
end
def initialize(message_window, *args, &block)
@choice_wait = 0
@choice_wait_press = false
choice_UvZVkywt_wcl_initialize(message_window, *args, &block)
end
#--------------------------------------------------------------------------
# * ALIAS - Frame Update
#--------------------------------------------------------------------------
unless method_defined?(:choice_NijdHkOl_wcl_update)
alias_method(:choice_NijdHkOl_wcl_update, :update)
end
def update(*args, &block)
update_input_wait
choice_NijdHkOl_wcl_update(*args, &block)
end
#--------------------------------------------------------------------------
# * NEW - Update Input Wait
#--------------------------------------------------------------------------
def update_input_wait
return if @choice_wait == 0
if @choice_wait_press && Input.press?(:C)
@choice_wait = $game_message.choice_wait
end
@choice_wait -= 1
end
#--------------------------------------------------------------------------
# * ALIAS - Start Input Processing
#--------------------------------------------------------------------------
unless method_defined?(:choice_kRGebiXc_wcl_start)
alias_method(:choice_kRGebiXc_wcl_start, :start)
end
def start(*args, &block)
@choice_wait = $game_message.choice_wait
@choice_wait_press = $game_message.choice_wait_press
choice_kRGebiXc_wcl_start(*args, &block)
end
#--------------------------------------------------------------------------
# * ALIAS - Handling Processing for OK and Cancel Etc.
#--------------------------------------------------------------------------
unless method_defined?(:choice_I4oHtm5H_wcl_process_handling)
alias_method(:choice_I4oHtm5H_wcl_process_handling, :process_handling)
end
def process_handling(*args, &block)
choice_I4oHtm5H_wcl_process_handling(*args, &block) if @choice_wait == 0
end
end # Window_ChoiceList