Automatically stop a timer when "show text" is up?

raffle

Veteran
Veteran
Joined
Oct 25, 2020
Messages
70
Reaction score
14
First Language
English
Primarily Uses
RMMV
Henlo everyone!

I come back again asking for help on a small little detail :kaocry:

Currently I'm using MOG_VisualTimer to have a little bar displaying when a timer is on:
PSK6KzC.png

It behaves the same as the default timer, it just shows up as a gauge instead.

Now I would like for it to pause whenever a "Show Text" window appears, since I don't want players to lose time if somehow a conversation happens or any other reason.
I couldn't find a way to do it so I also got HIME_TimerPause which let's me do:
  • script: $gameTimer.pause();
  • Show text
  • script: $gameTimer.resume();
This works fine too but then I realized I would have to do this for every single show text command in the game which would take huge amounts of time and clutter event pages, is there a way to have this done automatically either with event logic or another plugin? Or something that let's me create a preset of event commands that can be added before and after a specific event command?

Thank you for reading :kaojoy:
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,884
Reaction score
8,587
First Language
German
Primarily Uses
RMMV
only two realistic methods:
1) create a plugin that adds that function to all show text commands.
That should not be much work on its own, but it will probably risk compatibility with almost any plugin that changes the messaging system or show text commands.

2) use a multifile text editor (for example textpad, but there are many others) to open all json files, search them for the command sequence of the show text in every event and add the new sequence automatically.
That is simple to describe but requires careful work and backups because if you mess up, the engine will flood your screen with error messages.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,222
Reaction score
1,719
First Language
Portuguese - Br
Primarily Uses
RMMZ
Hi there!

A way to do it is to have a parallel event checking if there is any active timer going on.
If yes, then check if the message window is open.
If yes, you pause the timer. Otherwise, you resume it. Here is an example(ignore page 1):

1631814383060.png
 

raffle

Veteran
Veteran
Joined
Oct 25, 2020
Messages
70
Reaction score
14
First Language
English
Primarily Uses
RMMV
Thank you for the quick replies and for taking the time to help out :)
I ended up using Eliaquim's method and making it a parallel common event that's activated when the timer is running and disabled when its off, it works perfectly!
Thanks :kaojoy:
 

Latest Threads

Latest Posts

Latest Profile Posts

Monday morning, and the sudden message: Hey, can you set up a full second lesson about pixel art till tomorrow?
No one:
Steam game achievement: "Die 100 times in easy mode".
I want to learn Javascript to create a custom menu, but I don't really know where to start.
One uncomfortable truth that has withstood the test of time, is how most people will stand by while they see a crime happening, unless it's illegal to stand by. We probably wouldn't have stories about "special heroes" or games about heroes if the "everyday common folk" were largely capable of being heroes. Heroes face dangers that most people are not willing to.

Forum statistics

Threads
115,888
Messages
1,093,727
Members
151,134
Latest member
umememe
Top