GM: draw text
From GMpedia.org Wiki
- The correct title of this article is draw_text(x,y,string). It appears incorrectly here because of technical restrictions.
- The correct title of this article is draw_text(). It appears incorrectly here because of technical restrictions.
Arguments
x = Horizontal position (in pixels) on screen y = Vertical position (in pixels) on screen string = The thing you want displayed on screen
Limitations
must be Draw Event or used with Surfaces.
Note: Please remove limitations and port them in the "Remarks" section at the end of the article.
This function allows you to draw text directly on the screen in the current color (unlike show_message which pops up a message box). The x and y positions needn't be specific, they can be relative to an object, also, the 'string' can be a variable.
[edit] Example
draw_text(obj_player.x-10,obj_player.y-10,score);
Or, in conjunction with view_xview and view_yview to make text that follows you around in Views:
draw_text(view_xview,view_yview,"Sonic Room")
This article was originally found at the Game Maker Knowledge Base, contributed by nickydude.
See the talk page for details
See the talk page for details

