MZ Show message script call help

Hello! I'm trying to use script to set multiple message boxes because using the show text event gets kind of tedious and batch entry doesn't tend to always work how I want it. I end up with weird spaces and have to go to each message box to fix it so I tried this script block.

JavaScript:
$gameMessage.setSpeakerName("Lisa")
$gameMessage.add(Test);
$gameMessage.add(Test2);

And i want "Test" and "Test2" to show up in 2 separate message boxes but they just show up in one. Is that just how it works in the engine or am I doing something wrong? I looked through the MZ script call list and didn't find anything else relating to this.
For ease of reference, this is the fully-commented example from the MV / MZ Script Call List:
JavaScript:
// Set face: Actor1.png, index 0
$gameMessage.setFaceImage('Actor1', 0);
// Set background: Window
$gameMessage.setBackground(0);
// Set position: Bottom
$gameMessage.setPositionType(2);
// [MZ] Set speaker name: \c[6]\n[1]
$gameMessage.setSpeakerName('\\c[6]\\n[1]');
// Show text: I am \c[6]\n[1]\c[0]!
$gameMessage.add('I am \\c[6]\\n[1]\\c[0]!');
// Wait for message to be dismissed
this.setWaitMode('message');
The last line, this.setWaitMode('message'), is important: it tells this interpreter to wait until the message is dismissed before processing the next event command. Regardless, calling $gameMessage.add multiple times in one script call merges the text, because interpreter wait time/mode applies between event commands.

You could:
  1. Use the \f character (Form Feed, interpreted as "new page"), e.g.
    JavaScript:
    $gameMessage.add("Page 1.\fPage 2.");
  2. Or assign each distinct message's text in its own Script command.
For ease of reference, this is the fully-commented example from the MV / MZ Script Call List:
JavaScript:
// Set face: Actor1.png, index 0
$gameMessage.setFaceImage('Actor1', 0);
// Set background: Window
$gameMessage.setBackground(0);
// Set position: Bottom
$gameMessage.setPositionType(2);
// [MZ] Set speaker name: \c[6]\n[1]
$gameMessage.setSpeakerName('\\c[6]\\n[1]');
// Show text: I am \c[6]\n[1]\c[0]!
$gameMessage.add('I am \\c[6]\\n[1]\\c[0]!');
// Wait for message to be dismissed
this.setWaitMode('message');
The last line, this.setWaitMode('message'), is important: it tells this interpreter to wait until the message is dismissed before processing the next event command. Regardless, calling $gameMessage.add multiple times in one script call merges the text, because interpreter wait time/mode applies between event commands.

You could:
  1. Use the \f character (Form Feed, interpreted as "new page"), e.g.
    JavaScript:
    $gameMessage.add("Page 1.\fPage 2.");
  2. Or assign each distinct message's text in its own Script command.
Thank you! The \f character works perfectly! Wish you were able to use it in separate lines so you could separate each sentence more clearly without everything being on one line but you take what you can get.
Wish you were able to use it in separate lines
You can use \n (New Line) as usual for a line-break, if that's what you mean? E.g.
JavaScript:
$gameMessage.add("Line 1.\nLine 2.\fSecond page!");
Message text should automatically distribute itself over multiple "pages" if it exceeds the vertical space available in the current window.

These "backslash characters" are more formally known as escape sequences. You might find the information here helpful:
Off the top of my head, I think core MV/Z only applies special treatment to:
  • \f (as mentioned, for message breaks); and
  • \x1b (ASCII 27, ESC; used in parsing the engine's text codes).
Most other control characters, like \n, ought to act as usual. Vertical spacing, e.g. \v, might not work as expected due to the way the engine renders text.

Original thread: https://forums.rpgmakerweb.com/threads/show-message-script-call-help.178766/