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,979
Reaction score
8,620
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,226
Reaction score
1,725
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 Profile Posts

Disk Check Plugin - Running on Linux:
RMMV-Game-Mint.png
workin on some graphics for my game. was originally planning on doing a cartoony style for the town but I might stick with this instead
I'm so annoyed with myself...I can't get this code to work so it looks like I'm going the plugin route for a problem I should be able to do myself :kaolivid:Great. Now I get to murder save file compatibility. Again.
Can't believe my code from four years ago is still working! Did some expansions, and...
1635194553179.png
In related news, I may have an update for my old Extra status window plugin ready. That is, once I manage to sit down and update the documentation... and the demo project... :kaoswt:

Forum statistics

Threads
116,079
Messages
1,095,574
Members
151,450
Latest member
Dankim633
Top