Scheduler - When you want something to happen after an amount of frames - Printable Version +- Save-Point (https://www.save-point.org) +-- Forum: Material Development (https://www.save-point.org/forum-8.html) +--- Forum: Scripts Database (https://www.save-point.org/forum-39.html) +---- Forum: RPGMaker XP (RGSS) Engine (https://www.save-point.org/forum-116.html) +---- Thread: Scheduler - When you want something to happen after an amount of frames (/thread-2365.html) |
Scheduler - When you want something to happen after an amount of frames - Zeriab - 03-08-2008 Scheduler ~ Scripting Tool
Version: 1.0 Introduction How many of you tried creating a parallel process where you put in an amount of frames and then a script call or something else afterwards? Basically a simply way of doing something after an amount of frames. This is the principle behind the script. To schedule pieces of code to be executed after an arbitrary amount of frames. No making decrementing counters. The scheduler takes care of all that or well most of it. It is still not as simple as using the wait event command. Script Code: #============================================================================== You could check it if more than a month has passed since last edit. You know, just in case. More generally all material related to the Scheduler except the forum topic can be found here: http://zeriab.plesk3.freepgs.com/index.php...ipts/Scheduler/ Here is a binding if you want the scheduler to work for every frame. Basically for each Graphic.update the scheduler is updated. It doesn't matter whether you are in a menu, title screen, battle. As long as Graphic.update is called so is the scheduler. (The main scheduler) Code: module Graphics Semi-big and evil instructions Compatibility The Scheduler alone use only Ruby and could easily be placed in a Ruby if one wanted that. It is highly unlikely that you will encounter any compatibility issues with the backbone alone since it is independent from RGSS/2 library. On the other side there could potentially be problems with the bindings which makes use of the scheduler so it actually does something in game. Currently there is only the Graphics.update binding which makes compatibility issues very unlikely. Future Work - Explicitly exit/stop a scheduler. The scheduled items can then be discard, executed or maybe something else. - Error handling. (This may be an external. I.e. not embedded in the core) - Documentation Credits and Thanks Credits goes to Zeriab for creating the system I would like to thank everyone using their time to try and use my system. I would like to thank everyone reading this topic. Thanks. Author's Notes I would be delighted if you report any bug, errors or issues you find. In fact I would be delighted if you took the time and replied even if you have nothing to report. Suggestions are more than welcome. Note that I will release a demo which shows a couple of ways of using this script. Note also that I will always make a post when I have an update. (Small stuff like typos excluded) And finally: ENJOY! - Zeriab |