This function draws a string at any position within the room, using the current settings for drawing text.
The settings for drawing text are:
Use the string function to convert real numbers into text for drawing and + to combine strings. Use "\n" within a string to add a line break so it is drawn over multiple lines (for information on how to properly format a string and what escape characters you can use, please see the Strings page).
draw_text(x, y, string);
Argument | Type | Description |
---|---|---|
x | Real | The x coordinate of the drawn string. |
y | Real | The y coordinate of the drawn string. |
string | String | The string to draw. |
N/A
draw_text(x, y, "Hello, " + global.Name + "!\nI hope you are well!");
The above code will draw a string at the instance x/y position, which will use the string stored in the global variable global.Name and split it over two lines.