Reviving this topic because I don't feel this 'fix' properly fixes the problem.
If the result of evaluating the script is false then it will wait just like normally.
It doesn't wait on multi-line script calls. Two lines of
false will for example cause the event to wait one frame before continuing.
That said the waiting feature is nice and should be kept. Having false as what's triggering the wait is perhaps not the best idea since accidental waiting is likely to happen.
Of course you can just put
$game_switches[42] in a call script to wait until that switch is turned on. (No wait if it already is on)
My own fix is this:
class Interpreter
SCRIPT_WAIT_RESULTS = [:wait, FalseClass]
#-------------------------------------------------------------------
# * Script
#-------------------------------------------------------------------
def command_355
# Set first line to script
script = @list[@index].parameters[0] + "\n"
# Store index in case we need to wait.
current_index = @index
# Loop
loop do
# If next event command is second line of script or after
if @list[@index+1].code == 655
# Add second line or after to script
script += @list[@index+1].parameters[0] + "\n"
# If event command is not second line or after
else
# Abort loop
break
end
# Advance index
@index += 1
end
# Evaluation
result = eval(script)
# If return value is false
if SCRIPT_WAIT_RESULTS.include?(result)
# Set index back (If multi-line script call)
@index = current_index
# End and wait
return false
end
# Continue
return true
end
end
It fixes the multi-line issue and I use
:wait to when it should wait. The
FalseClass check is for providing compatibility with and older version of mine.
To wait for switch 42 to be on you now have to use something like
:wait unless $game_switches[42].
Considering how it can ease certain integration issue it's stupid not to keep that feature :3
*hugs*