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,901
Reaction score
8,596
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,223
Reaction score
1,722
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

Finally got my website fixed and the security sorted so it's been a productive day. Can I go to sleep now? I mean... I don't need to work right?
It's always a good idea to refresh yourself on what your plugins do. I'm working on a map with opening walls, and I was about to tear my hair out over how much image editing and hand-constructing of autotiles I'd have to do, when I looked again and saw @Shaz 's Tile Changer could copy areas from another map.
"sorry it took me so long to respond" - can we please agree not to say that anymore unless it actually took a long time?! (Like 36hrs at least) I mean, I'm running out of funny responses here xD
Ugh... 4:53AM over here and I can't sleep so why not just game make.
I just love the MV feature that allows you to create your own animations!

Forum statistics

Threads
115,919
Messages
1,094,016
Members
151,174
Latest member
sardin
Top