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

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
528
Reaction score
220
First Language
thai
Primarily Uses
RMMV
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
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,135
Reaction score
1,102
First Language
Spanish
Primarily Uses
RMVXA
you mean to combine the two or split the two?
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
528
Reaction score
220
First Language
thai
Primarily Uses
RMMV
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
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,135
Reaction score
1,102
First Language
Spanish
Primarily Uses
RMVXA
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.
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
528
Reaction score
220
First Language
thai
Primarily Uses
RMMV
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
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,135
Reaction score
1,102
First Language
Spanish
Primarily Uses
RMVXA
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.
 

Eliaquim

Raze: The Rakuen Zero's Guardian!
Veteran
Joined
May 22, 2018
Messages
1,338
Reaction score
591
First Language
Portuguese - Br
Primarily Uses
RMMV
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.
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
528
Reaction score
220
First Language
thai
Primarily Uses
RMMV
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
 

Eliaquim

Raze: The Rakuen Zero's Guardian!
Veteran
Joined
May 22, 2018
Messages
1,338
Reaction score
591
First Language
Portuguese - Br
Primarily Uses
RMMV
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 :(
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

made a bio for the protag in my project!
Beggar : "I haven't eat for days..."
Kid : "Just do crime! You will get daily necessity for free in prison~"
Stream is a bit late but will be live shortly with some game development! Feel free to drop by!
omg, why persona 5 is so good?

Forum statistics

Threads
99,158
Messages
962,433
Members
130,725
Latest member
teendinsaikha
Top