MZ [SOLVED] Return Boolean if Message is Finished being Read

EDIT: This is solved. Under my original question is the solution for those who were wondering the same thing.

Hello, I am trying to create an effect where an event plays after a variable is changed, which happens when a message is fully read out (for example, a visual novel bust speaking throughout the message but starts blinking when the message is read out). Is there a way to call a function that checks where the game has fully read the message or not?

EDIT (Solution):

MAKE SURE YOU HAVE VISUSTELLA CORE ENGINE TO MAKE THIS WORK! (its free from their sample project)

[ISPOILER]
Screenshot (28).png

In the console, we can see that
JavaScript:
$scene._messageWindow._textState
returns false during the function isEndofText if the message is being read out. Otherwise, textState becomes null as the value is no longer needed when the message is finished. So we can check for that.

Screenshot (32).png


Here we have a sample autorun event with a long message that has a variable set to 0 and turns on a test switch.

Screenshot (33).png


As a common event, we have a test effect that is parallel and runs always when the test switch is ON. We make a script conditional where textState is checked to equal null. Once it equals null then the variable is set to 1 and the common event ends by setting test switch to OFF.

Just run the test switch every time you want the effect to happen and add any effects to the common event.
[/ISPOILER]
https://hakuenstudio.itch.io/eli-message-actions-for-rpg-maker if you want it for RMMZ? You can change switch/variable via messages with this)
https://hakuenstudio.itch.io/eli-message-actions-for-rpg-maker if you want it for RMMZ? You can change switch/variable via messages with this)
Looks cool. As long as the escape code isn’t processed when the message begins then it should work fine.
Question: if a dialogue finished doesn't it mean the message is read?
Why can't you add a check after a show text command?

Edit* OK I think I understand what you mean.
I've always wondered the same thing, how does the system KNOW when a message is finished typing?
Surely there must be a way to check, otherwise plugins that play typing sounds while text is appearing wouldn't know when to stop playing the sfx, and 'mouth moving' plugins for faces and busts also wouldn't know when to stop moving...
There's a conditional you can use to check if a game message is open:
$gameMessage.isBusy()
But I've never seen one that checks if all text is finished appearing on a message...
😔
I also made a plugin that allows you to run script inside a text. It is a bit barebone.
It appears yep message core has a similar function. Well so I just leave it as it is for now, unless I get some cool ideas.
Is there a way to call a function that checks where the game has fully read the message or not?
In MV, you can do that either by checking the _textState property of the message window (it will be an object while text is still processing, and null when it finishes), or you can check the paused property (it will be true when the pause indicator is on, i.e. the message is finished, and false otherwise).

One of those will probably work in MZ too.
I think message is fully read when it terminate the last message?
but how can you even check it if it's truly readed if they just "skip"
the text?

I think there is more to it than the eye meets, so what is "true"?

set a timer to be higher to increase the variable or do not increase if lower
as it wont be "truly" readed, but till, this can be manipulated as well!

so how would you like to function it as a "true" readed message to the end?
I think message is fully read when it terminate the last message?
but how can you even check it if it's truly readed if they just "skip"
the text?

I think there is more to it than the eye meets, so what is "true"?

set a timer to be higher to increase the variable or do not increase if lower
as it wont be "truly" readed, but till, this can be manipulated as well!

so how would you like to function it as a "true" readed message to the end?
Yes, if “true”, then change variable and/or perform event parallel to message event to create effect
In MV, you can do that either by checking the _textState property of the message window (it will be an object while text is still processing, and null when it finishes), or you can check the paused property (it will be true when the pause indicator is on, i.e. the message is finished, and false otherwise).

One of those will probably work in MZ too.
this would probably work
I also made a plugin that allows you to run script inside a text. It is a bit barebone.
It appears yep message core has a similar function. Well so I just leave it as it is for now, unless I get some cool ideas.
ill look at it when i can.

Question: if a dialogue finished doesn't it mean the message is read?
Why can't you add a check after a show text command?

Edit* OK I think I understand what you mean.
No problem, the purpose is to perform the action if the message has been read and the player is idle and hasnt pressed the “enter” input yet to continue.

Thank everyone for the help! Ill look into it again when i can.
hi, I have solved what I was accomplishing using @Mac15001900's method. For anyone wanting to accomplish it yourself, please see original post.
hi, I have solved what I was accomplishing using @Mac15001900's method. For anyone wanting to accomplish it yourself, please see original post.
Thanks for including a detailed solution for everyone else!

I just wanted to point out that such a parallel event could probably use a wait command at the end. Unless you actually need the effect to happen on precisely the frame when text finishes, adding, say, a "wait 5" command will help reduce lag from it and only add a maximum of 5 frames of delay.
Thanks for including a detailed solution for everyone else!

I just wanted to point out that such a parallel event could probably use a wait command at the end. Unless you actually need the effect to happen on precisely the frame when text finishes, adding, say, a "wait 5" command will help reduce lag from it and only add a maximum of 5 frames of delay.
Yes, in my case, it just needed to happen any time between message end and the idle before the next enter confirmation, but for specific waits this is useful to know

Original thread: https://forums.rpgmakerweb.com/threads/solved-return-boolean-if-message-is-finished-being-read.174914/