Game Maker语言新行

the*_*w89 1 gml game-maker game-maker-studio-1.4 game-maker-language game-maker-studio-2

我正在编写一个游戏制作者脚本,并想知道如何在下一行显示消息.

恩.show_message("你好" 某事 +"世界")输出:

show_message("Hello" + *something* + "World")
Run Code Online (Sandbox Code Playgroud)

Fre*_*tte 11

始终在游戏制作者中使用#作为新行!所以你应该写

show_message("First Line#Second Line");
Run Code Online (Sandbox Code Playgroud)

这应该工作.


Mic*_*odd 5

我不是正面的(之前从未使用过Game Maker),但是手册似乎表明#将起作用(尽管这可能仅适用于draw_string).您还可以尝试Chr(13)+ Chr(10),这是一个回车和换行.

所以,你可以尝试:

show_message("Hello#World") 
Run Code Online (Sandbox Code Playgroud)

要么

show_message("Hello" + chr(13) + chr(10) +"World") 
Run Code Online (Sandbox Code Playgroud)

来自:http://gamemaker.info/en/manual/gmaker