is there a way to shorter game $gameMessage.add line break?

hi
to make two line message now I do
$gameMessage.add("Make sure")
$gameMessage.add("she stays there this time.")
and I use it a lot because I use message pop up
and don't like too long window for one line
so is there a way to do line break more shorter version
thank you
//edit
find out that \n work
but if you have other good method I still open up
image_20200529_081158.jpgimage_20200529_081010.jpg
you mean to combine the two or split the two?
two line like the second picture
I need to code

$gameMessage.add("Make sure")
$gameMessage.add("she stays there this time.")

I want something shorter
now I find out
$gameMessage.add("Make sure \nshe stays there this time.")

something I want is just
$gameMessage.add("Make sure
she stays there this time.")
well... but that doesn't work
if the problem is the shortness of the script box, you can always use a sum of shorter lines:
ln1 = "this"
ln2 = "that"
obj = $gameMessage
obj.add(ln1\nln2)
trade one long line, for multiple short ones.
if the problem is the shortness of the script box, you can always use a sum of shorter lines:
ln1 = "this"
ln2 = "that"
obj = $gameMessage
obj.add(ln1\nln2)
trade one long line, for multiple short ones.
thank you I think that too
but more likely I just want to store text like
text = "I like flower
but I don't have time
to take care of them"
with the line break
$gameMessage.add(text)
but maybe I will go back to use the default show text
it's already simple more than use script
that would require a rework of the interpreter dealing with that part, because it'll have to spot line breaks defined as things other than \n.
There is another way than using \n.
You can use string literals:
JavaScript:
$gameMessage.add(`Make sure
she stays there this time.`)
I never tested it, but I use it in a lot of my plugin, this should work.
There is another way than using \n.
You can use string literals:
JavaScript:
$gameMessage.add(`Make sure
she stays there this time.`)
I never tested it, but I use it in a lot of my plugin, this should work.
wow this work magically!
thank you
did you know how to get yanfly name box work with $gameMessage.add too?
I try some but it's always buggy
wow this work magically!
thank you
did you know how to get yanfly name box work with $gameMessage.add too?
I try some but it's always buggy
Glad to help!
I never used this yanfly plugin 🙁

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-shorter-game-gamemessage-add-line-break.122175/