draw_text

This function draws a string at any position within the room, using the current settings for drawing text.

The settings for drawing text are: 

Usage Notes

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).

 

Syntax:

draw_text(x, y, string);

ArgumentTypeDescription
xRealThe x coordinate of the drawn string.
yRealThe y coordinate of the drawn string.
stringStringThe string to draw.

 

Returns:

N/A

 

Example:

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.