RPG Maker Forums

Timers v1.1
FeelZoR

Free to Use for both Commercial and Non-Commercial projects.
Credits not required but highly appreciated!

You can find a more in-depth version of the TOS here.


Requested here.

Introduction
Have you ever needed to use some Timers in your game? For example, to stop the game for a few seconds, but the "Wait" command wasn't enough? (or you would put 50 "Wait 999 frames").
With this real time plugin, you can create multiple timers. You create them in one call, and check if the time elapsed since their creation is over a certain amount of time (in milliseconds, seconds or minutes) and you can do something after this specific time!

Features
- Create timers and check if the time elapsed since their creation is over a certain amount of time.
- Timers are dependent of each save file.
- Timers won't run while the game is paused (in menu, message window open, ...).

How to Use
Do not rename the file! It must be called Timers.js in order to function correctly!

Plugin Commands:
- Timers CREATE NameOfTheTimer MSRollback - Creates a new Timer.
NameOfTheTimer - The name of the timer. Be careful, the name is case sensitive. You can you almost any symbol you want, though it's better to keep clear and alphanumerical names.
MSRollback - If you don't want the timer to use the current time, use this parameter. It will allow you to make a timer MSRollback milliseconds old.
E.g.: Timers CREATE Chicken 500 - If I execute this command at 2:00:00.500, it will create a Timer named Chicken with the time 2:00:00.000.
E.g.: Timers CREATE Chicken -500 - If I execute this command at the same time than before, it will create a Timer named Chicken with the time 2:00:01.000.
Careful: If the Timer already exists, it won't be updated.

- Timers UPDATE NameOfTheTimer MSRollback - Updates (or create) a new timer.
The usage is the same than Timers CREATE NameOfTheTimer MSRollback, but it updates the Timer if it already exists and create it if it doesn't.

- Timers DELETE NameOfTheTimer - Deletes the specified timer.

- Timers MODE mode - Changes the Timer mode.
mode - The new mode to use. Accepted values are:
  • ms: Set the mode to milliseconds. (milliseconds, msec, msecs and reset are accepted values, too).
  • s: Set the mode to seconds. (sec, seconds and secs are accepted values, too).
  • min: Set the mode to minutes. (m, minutes and mins are accepted values, too).
E.g.: Timers MODE s - Will set the mode to seconds.
Script calls:

- Use $gameTimers.isOver(name, time); to know if the Timer name is older than the time specified.
name: Case sensitive; the name of the timer.
time: The time that needs to be elapsed since the last timer update for this method to return true.
Depending on the mode, the time needs to be in milliseconds, seconds or minutes.
E.g.: $gameTimers.isOver("Chicken", 50); will return true if the timer Chicken hasn't been updated in 50ms, 50s or 50min depending on the mode.

- Use $gameTimers.isOverVar(name, variable); to do the same than the previous script call, with the content of a variable instead of a constant value.
E.g.: $gameTimers.isOverVar("Chicken", 2); will return true if the timer Chicken hasn't been updated since the time specified in variable 2. It also uses the mode to decide whether it's milliseconds, seconds or minutes.

Demo
Available here.
Sounds and graphics removed to make the download faster. Please copy and paste it in a new project.

Script
You can download it here.

FAQ
No FAQ yet.

Credit and Thanks
- FeelZoR for making the plugin :p

Changelog

Version 2.0 - Major update
+ Added possibility to delete a timer
+ Timer update is now handled by a specific command.
+ Plugin commands used instead of script calls when possible.
* Timer creation cannot update timers anymore.​

Version 1.1 - Bug fix
  • Corrected a bug where the save wouldn't work.
Version 1.0 - Initial Version

Author's Notes
As this is my first plugin in RMMV, do not hesitate to report any bad things in the code.
It's probably not very well-designed sometimes, as I'm not very used to JS and RMMV yet, I'm learning with what's already made! :D

Do not hesitate to report me any bug you find, and I'm open to suggestions too!

Latest Threads

Latest Posts

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,455
Members
137,821
Latest member
Capterson
Top