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
34,000
Reaction score
8,631
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,231
Reaction score
1,727
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

It does sometimes get a little embarrassing that I often come here to ask for help with something and seldom have anything to actually show for it. If there is one thing though I can commend myself for, it's for sticking with an idea I've been tinkering with for this long now and gradually making headways. Even though I've been reserved about my progress, I can say I'm farther now than where I initially started.
I'm gonna put my project on pause for a tiny bit so I can explore the engine outside of it... Winging it can only get you so far LMFAO
Have seen some of my favorite people here posting and helping others with questions today -- love to see it!
Haven't been on here actively in awhile, project is going strong my biggest issue is the STORY, i'm refining the plot and learning so much i decided to take a writers class to improve even more but the programming and functionality of the game is stepping up nicely!

Forum statistics

Threads
116,132
Messages
1,096,052
Members
151,552
Latest member
Staples
Top