I am writing a GML script and wanted to know how to make a message appear on the next line:
ex.
show_message("Hello" + *something* + "World")
outputs:
Hello
World
I am writing a GML script and wanted to know how to make a message appear on the next line:
ex.
show_message("Hello" + *something* + "World")
outputs:
Hello
World
I'm not positive (never used Game Maker before) but the manual appears to state that a # will work (though that may only work for draw_string). You can also try Chr(13) + Chr(10), which are a carriage return and linefeed.
So, you could try:
show_message("Hello#World")
or
show_message("Hello" + chr(13) + chr(10) +"World")
Game Maker 1.4 can use the pound sign for newlines, as well as the linefeed character (chr(10)
):
show_debug_message("Hello#World");
show_debug_message("Hello" + chr(10) + "World");
Since GameMakerStudio 2 you can now use escaped characters;
show_debug_message("Hello\nWorld");
show_debug_message("Hello#World"); //Will not work, the pound sign is now literal!
show_debug_message("Hello" + chr(10) + "World");
For GameMaker: Studio 2, always use
\n
as new line.For earlier releases, always use
#
as new line.