$gameMessage.add("Hello") adds to previous message...!?

Hey guys,

I would like to have these two seperate messages:

$gameMessage.setFaceImage('Actor1',0)
$gameMessage.add("Hello");

$gameMessage.setFaceImage('Actor2',0)
$gameMessage.add("Hi! How are you");

And unfortunately I have to do them by using script.

When I just put them like that, for some reason, I get only 1 textbox saying:
"Hello
Hi! how are you?"

But I would like to have two seperate messages...

Can somebody help...?
Hi! Try this way:

Code:
$gameMessage.setFaceImage('Actor1',0)
$gameMessage.add("Hello");
$gameMessage.newPage()
$gameMessage.setFaceImage('Actor2',0)
$gameMessage.add("Hi! How are you");

This line of code is useful for saying to the system to clear the box and start a new page 😂

Code:
$gameMessage.newPage()
Thank you! Sadly, it didn't work... the faceset still remains the same...
Pardon me for commenting in an old thread, but I have this exact problem, and I've been searching for a solution for hours. As jjelroy above mentions, $gameMessage.newPage() does not work. Anyone know how to make it work?
Try this :
Code:
$gameMessage.setFaceImage('Actor1',0)
$gameMessage.add("Hello");
this.setWaitMode('message');
and the next window in a separate script call :
Code:
$gameMessage.setFaceImage('Actor2',0)
$gameMessage.add("Hi! How are you");
this.setWaitMode('message');
From what I understand, it seems everything inside the same script call is send to the engine at once (before showing up and expecting any input from the player), so if you you put several setFaceImage() command in the same script call, only the last one will be remembered.
Why do you need to do it via script?
TWings, yeah that works exactly as intended. What really tripped me up is that you need a separate script call just like you said. Had to make some weird adjustments but it works.


Shaz, I've got a cellphone item that has some npcs comment on the surroundings. Rather than have an if statement for every single room in the game (probably 75 or so rooms multiplied by three different npcs), it seems much more effective to store the scripts as strings in a nested set of arrays in a JSON file, and eval() each item in the innermost array. Problem is you can't just use a for loop to go through the array, you need multiple, independent script calls as TWings has explained.

Edit: thanks for the reply, TWings!
Necro-post notice: Ambition
It is usually better to start a new thread rather than resurrecting an old one.

Moderator note: Closing this.

Original thread: https://forums.rpgmakerweb.com/threads/gamemessage-add-hello-adds-to-previous-message.87583/