T34KEN

Happy game maker :-)
Veteran
Joined
Dec 5, 2019
Messages
41
Reaction score
18
First Language
Polish
Primarily Uses
RMMV
Hi,
Is there any existing plugin for rpg maker mz that allows to have more than one timer working at a time and after it ends for example a switch could be turned off?
Basically something like Shaz has done for MV --> link, but for MZ.

It's not something essential, but it would be nice if those timers could be shown somehow as well.
 

Arthran

Veteran
Veteran
Joined
Jun 25, 2021
Messages
501
Reaction score
478
First Language
English
Primarily Uses
RMMZ
I don't know if there are any or not, but I went ahead and made a little compatibility patch that will let you use Shaz's plugin in MZ. Calling it a "patch" might not even be accurate, since her code was actually still all valid in MZ and I didn't actually need to patch any of it--the only issue is that you need a way to input the plugin commands, so this will give you a script call with which to input one. So I guess that "addon" might be a better word than "patch"?

Anyway, make sure that you have both this plugin, and Shaz's plugin active in your plugin manager, and then you can use this script call to input her plugin commands:

JavaScript:
timerCommand.call(this, "Shaz plugin command");
Just replace Shaz plugin command with one of the plugin commands that she mentioned in her helpfile. So for example, if the plugin command would look like timeLeft MyTimer 12 in MV, then this would be your script call:
JavaScript:
timerCommand.call(this, "timeLeft MyTimer 12");

It's basically that simple, but there are two important caveats to be aware of:

The first is that some of her plugin commands make use of backslashes (this character: \ ), and those behave differently in a script call than they do in a plugin command. So any time you need to use a backslash, you've gotta use two of them. For example instead of \setSS, you would type \\setSS.

The second is is that some of her plugin command use quotation marks, and the script call will also be surrounding the command with quotation marks, so you need to input them a certain way. For example, if the plugin command itself is using single quotes (i.e. 'A'), then you need to make sure that when you stick that plugin command inside the script call, that you do *not* use single quotes to surround the entire plugin command. Use double quotes instead (i.e. "Plugin command"). I don't know if that makes sense, but here is an example of what I mean.

Here is what the plugin command would look like in MV:
Code:
AddTimer MyTimer 60 \setSS([<thismap>, <thisevent>, 'A'], false)

Here is what your script call would look like:
JavaScript:
timerCommand.call(this, "AddTimer MyTimer 60 \\setSS([<thismap>, <thisevent>, 'A'], false)");

Hopefully that all makes sense. Let me know if it doesn't.
 

Attachments

  • Multi_Timers_Patch.js
    175 bytes · Views: 7
Last edited:

T34KEN

Happy game maker :-)
Veteran
Joined
Dec 5, 2019
Messages
41
Reaction score
18
First Language
Polish
Primarily Uses
RMMV
I don't know if there are any or not, but I went ahead and made a little compatibility patch that will let you use Shaz's plugin in MZ. Calling it a "patch" might not even be accurate, since her code was actually still all valid in MZ and I didn't actually need to patch any of it--the only issue is that you need a way to input the plugin commands, so this will give you a script call with which to input one. So I guess that "addon" might be a better word than "patch"?

Anyway, make sure that you have both this plugin, and Shaz's plugin active in your plugin manager, and then you can use this script call to input her plugin commands:

JavaScript:
timerCommand.call(this, "Shaz plugin command");
Just replace Shaz plugin command with one of the plugin commands that she mentioned in her helpfile. So for example, if the plugin command would look like timeLeft MyTimer 12 in MV, then this would be your script call:
JavaScript:
timerCommand.call(this, "timeLeft MyTimer 12");

It's basically that simple, but there are two important caveats to be aware of:

The first is that some of her plugin commands make use of backslashes (this character: \ ), and those behave differently in a script call than they do in a plugin command. So any time you need to use a backslash, you've gotta use two of them. For example instead of \setSS, you would type \\setSS.

The second is is that some of her plugin command use quotation marks, and the script call will also be surrounding the command with quotation marks, so you need to input them a certain way. For example, if the plugin command itself is using single quotes (i.e. 'A'), then you need to make sure that when you stick that plugin command inside the script call, that you do *not* use single quotes to surround the entire plugin command. Use double quotes instead (i.e. "Plugin command"). I don't know if that makes sense, but here is an example of what I mean.

Here is what the plugin command would look like in MV:
Code:
AddTimer MyTimer 60 \setSS([<thismap>, <thisevent>, 'A'], false)

Here is what your script call would look like:
JavaScript:
timerCommand.call(this, "AddTimer MyTimer 60 \\setSS([<thismap>, <thisevent>, 'A'], false)");

Hopefully that all makes sense. Let me know if it doesn't.
I've just tested it and it works flawlessly. In case anything seems broken later I might come back here, but it doesn't seem so.
Thank you for your help and explanation. I really appreciate that :kaothx:
 

Latest Threads

Latest Posts

Latest Profile Posts

Camping inside a hidden cave.
LzSHByh.jpg
I don’t believe in astrology. I’m a Sagittarius and we’re skeptical.
senary_concept_art.png
The concept art for the sprite of Senary, a major character in my upcoming (as-of-yet-unnamed) project. She is known as the Timelord because she can "stop time" by making eye contact with a person; Paralyzing them for a short period of time through a type of hypnosis. Tell me what you think about her. I'm thinking of changing the color of her coat.

Forum statistics

Threads
124,368
Messages
1,163,129
Members
163,164
Latest member
kingfathom
Top