Tsukihime 1,489 Posted May 2, 2012 How do I write my own "wait" function?I want to use "wait" in many scripts to add delay and stuff, but I don't know how it works.Any ideas? Share this post Link to post Share on other sites
Nicke 151 Posted May 2, 2012 What are you trying to do? An animation in a scene? Please give us more details. Share this post Link to post Share on other sites
Tsukihime 1,489 Posted May 2, 2012 (edited) Well, it was really just a generic wait function that does pretty much what the game interpreter does lol So for example, for my picture wrapper, I don't really have any real way to specify "wait for completion" of previous function. Game interpreter has its own fiber that it can use, but in my case, I might be using scripts that don't go through the interpreter at all (eg: key presses) Edited May 2, 2012 by Tsukihime Share this post Link to post Share on other sites
Mephistox 52 Posted May 2, 2012 This is very rusty but works: xxx.times { Graphics.update } 1 Share this post Link to post Share on other sites
Tsukihime 1,489 Posted May 3, 2012 Oh it looks like they do the same thing in Scene_Battle when they need to add a short wait. Just update that many times lol Share this post Link to post Share on other sites
Cidiomar 39 Posted May 4, 2012 Ruby don't support goto anymore so forget about wait in event style by now. Only in really specifiq stuff can be done an wait system like in events Wait in events is one of those XD Share this post Link to post Share on other sites
Mephistox 52 Posted May 4, 2012 Maybe, you can play with Fiber, like they did with the Message Window also if you want a a more sophisticated wait commands, but this only would work with the scene in particular, or creating some kind of method for scene_base to allow to use in all the child scenes for this. Share this post Link to post Share on other sites