M
myemanisbob
Guest
As the Title suggests, I'm trying to draw text on the screen whenever an enemy dies. My dead enemy is a separate object, so I'm writing all of this code on his create event, so that it triggers the second he dies. The game is not crashing, but no text is appearing. What am I doing wrong? All I want is the letter F to appear on the top left of the screen when an enemy dies.
Code:
gui_width = display_get_gui_width();
gui_height = display_get_gui_height();
gui_margin = 32;
text_x = gui_width + 200;
text_y = gui_height + gui_margin;
text_itemheight = font_get_size(fnt_menu);
draw_set_font(fnt_menu);
draw_set_halign(fa_left);
draw_set_valign(fa_top);
var txt = "F"
var xx = text_x;
var yy = text_y - (text_itemheight * 1.5);
draw_set_color(c_black);
draw_text(xx,yy,txt);