Introduction
A simple script (fix) to make "show text" still combine windows with choice selections when separated by conditional branches, comments or jump to label events.
Features
The event "show text" will combine with choice selection, number selection or item selection regardless of any of the following being executed inbetween:
while check_text_persist(next_event_code); end #Smarter Text Persistence
case next_event_code
when 102 # Show Choices
@index += 1
setup_choices(@list[@index].parameters)
when 103 # Input Number
@index += 1
setup_num_input(@list[@index].parameters)
when 104 # Select Item
@index += 1
setup_item_choice(@list[@index].parameters)
end
wait_for_message
end
def check_text_persist(code)
case code
when 111 # Conditional Branch
@index += 1
execute_command
if (next_event_code==411) # Else
@index += 1
execute_command
end
@indent += 1
return true
when 0 # Close indent
if @index == @list.length - 2 #bugfix #1
return false
end
@index += 1
@indent -= 1
return true
when 108, 119, 411, 412 # Comment, Jump to Label, Else, Conditional Branch End
@index += 1
execute_command
return true
end
return false
end
end
复制代码
FAQ
Q: What is this script compatible with?
A: Mostly anything, if another script modifies command_101, try adding in the line "while check_text_persist(next_event_code); end" above the "case next_event_code" in the other script.