draw_text(x,y,string)

Drag & Drop equivalent : GM110

 

x = Horizontal position (in pixels) on screen

y = Vertical position (in pixels) on screen

string = The thing you want displayed on screen

 

Example #1:

draw_text(0,0,"Hello Everyone! Isn't GMKB wonderful!!");

 

This function allows you to draw text directly on the screen in the current colour (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:

 

Example #2:

draw_text(obj_player.x-10,obj_player.y-10,score);

 

The most common use is to draw lives / score / room within a view and keep it in view as the player moves, you need to use view_xview and view_yview in the x and y positions to achieve this:

 

Example #3:

draw_text(view_xview,view_yview,"Sonic Room")

 

Revision #1