In Game_Interpreter, there is a wait method that tells the thread to sleep for a given amount of time
def wait(duration) duration.times { Fiber.yield }endThere are also commands that say things like this
Where they explicitly yield instead of just calling something like wait(1)I'm not sure if there's really a difference between the two in terms of outcome, but it seems like it would be better to call the wait method instead of just calling Fiber.yield directly.
Thoughts?
EDIT: for clarification, what I mean is instead of saying something like
How about saying something like
Or even just defining a new wait method that simply does
def wait(duration) duration.times { Fiber.yield }endThere are also commands that say things like this
Code:
def wait_for_message Fiber.yield while $game_message.busy?end
Thoughts?
EDIT: for clarification, what I mean is instead of saying something like
Code:
Fiber.yield while $game_message.busy?
Code:
wait(1) while $game_message.busy?
Code:
Fiber.yield
Last edited by a moderator:

