- Joined
- Jun 30, 2017
- Messages
- 42
- Reaction score
- 35
- First Language
- spanish
- Primarily Uses
- RMMV
Hi, I am currently working on a plugin, and i am facing some problems trying to understand how
messages work in the javascript api.
I am not a totally novice on javascript, but new on rpg maker mv
My code is inside a plugin command:
How to script a wait for user to close the message window?
Choices have callbacks, but $gameMessage.add() automatically returns (i supose there's a queue of messages) and the rest of my script is executed. Example:
Some side effects of this:
Because setFaceImage('testman', 2) is inmediatelly executed, what you see in-game is
two messages with the same face ('2' in this case, te last executed one).
How is a wait for messageBox-close scripted?
Any help will be apreciated.
messages work in the javascript api.
I am not a totally novice on javascript, but new on rpg maker mv
My code is inside a plugin command:
Code:
$gameMessage.add("Hi1");
Choices have callbacks, but $gameMessage.add() automatically returns (i supose there's a queue of messages) and the rest of my script is executed. Example:
Code:
// code inside a plugin command
$gameMessage.newPage();
$gameMessage.add("Hi1");
$gameMessage.newPage();
$gameMessage.add("Hi2");
console.log("END HERE"); // This is inmediatelly executed before all messages are displayed and closed by the user :(
Code:
$gameMessage.setFaceImage('testman',0); // Setting face 0
$gameMessage.newPage();
$gameMessage.add("Hi1");
$gameMessage.setFaceImage('testman',2); // Setting face 2 (inmediatelly executed)
$gameMessage.newPage();
$gameMessage.add("Hi2");
two messages with the same face ('2' in this case, te last executed one).
How is a wait for messageBox-close scripted?
Any help will be apreciated.




