.

.
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.
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.
.

Original thread: https://forums.rpgmakerweb.com/threads/115238/