Pause common event during messages

Romanticist

Veteran
Veteran
Joined
Oct 8, 2015
Messages
215
Reaction score
114
First Language
English
Primarily Uses
RMVXA
I have a day/night common event system that counts every second in a variable until it reaches a certain number, and then the time of day changes. Sometimes, events will happen when the time changes. The problem is, the variable timer continues to run even while a dialogue message window is open. So if you leave the game running or take a long time to complete dialogue, the timer may reach a time-of-day change, but the change won't occur until after the dialogue window has closed.
Basically, the common event continues to run even during message scenes, but only certain parts of the event run (like the variable updates), and then it kind of glitches out after the message window closes because it's trying to catch up and do many things at once.

It's complicated to explain, but tbh the details needn't matter much, but I still thought I should give a brief overview regardless.
All I am asking for is a script solution where if the game message scene is opened, the common events completely pause. Is this possible? Kind of like how the events pause when you open the game menu. Perhaps that could be replicated when a dialogue window is open -- except, only for common events, not for map events (because I wouldn't want the game world to freeze when the player engages in dialogue haha).

Thanks for any help!
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
538
Reaction score
379
First Language
English
Primarily Uses
RMVXA
You could include everything inside a conditional branch with a script code:
Code:
!$game_message.busy?
That way, the variable will only update if there isn't a message.

You could also make some kind of master switch and have it so the variable only updates when that switch is off, and then you could turn the switch on when you do any cutscenes or whatever.
 

CraneSoft

Filthy Degenerate
Veteran
Joined
Apr 16, 2016
Messages
97
Reaction score
85
First Language
English
Primarily Uses
RMVXA
I'll not sure if this needs a script to achieve, as I'll assuming you are using a parallel common event to count every second in a variable using a switch, if that's the case you simply had to turn that trigger switch off whenever you interact with anything to stop the count, then turn it back on after the event concludes so it resumes.
 

Romanticist

Veteran
Veteran
Joined
Oct 8, 2015
Messages
215
Reaction score
114
First Language
English
Primarily Uses
RMVXA
You could include everything inside a conditional branch with a script code:
Code:
!$game_message.busy?
That way, the variable will only update if there isn't a message.
Awesome, I'll try that script code out.
And I just tested it and it works great, thank you! :kaoluv:

You could also make some kind of master switch and have it so the variable only updates when that switch is off, and then you could turn the switch on when you do any cutscenes or whatever.
I'll not sure if this needs a script to achieve, as I'll assuming you are using a parallel common event to count every second in a variable using a switch, if that's the case you simply had to turn that trigger switch off whenever you interact with anything to stop the count, then turn it back on after the event concludes so it resumes.
I was thinking of doing that but I am already controlling so much with switches and it would be much more efficient to just have a script (or script code) to turn off common events during messages rather than add an off and on switch to every event that has a message :rswt
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

*tries to study Emergence of Bangladesh: Ancient Bengal* Matsyanyayam- When the law of punishment is kept in abeyance... okay what? *searches dictionary* oh! Ok. In abeyance, it gives rise to such disorders as is implied in the proverb of fishes i.e the larger fish swallows a small one- wait fishes eat each other!? Is that like... fishy cannibalism!?...Oh! It's 8:30! Time for dinner! *throws book on floor*
Babbaditch Finster and the Seven-Sided Cube has got to be one of my favorite classic games that didn't exist when I was kid, or ever
My tutorial about frankenspriting is now online :3 Any topic you would like to see next?
Stuffing three people in a room and thinking they'll study together is so wrong XD I don't get how people do group studies. We just end up gossiping about everything except studying lol
Been parallax mapping nigh all night. :D

Forum statistics

Threads
93,394
Messages
911,954
Members
122,899
Latest member
Antelope
Top