-1

i'd like to draw something over my sprite when the mouse is on it. Something like that (in the draw event of my object) :

if(ev_mouse_enter)draw_text(x,y,hp);

But it's not working (i know why). I've been thinking about using some boolean to counter that. Is it my only option ?

  • 1
    I'm certain that using a boolean to leave the draw_text() available is a solid option, you don't need to wonder about a different options if this works. – Steven Feb 12 '20 at 07:43

1 Answers1

0

Well, if you're doing something like starcraft, they were billions, etc. you may want to have a 'selected' variable for the last unit / building / etc to keep that information up for them.

if (mouse_check_button_pressed(mb_left)) {
   if (place_meeting(mouse_x, mouse_y, oTarget)) {
      oGame.selectedUnit = other.id;
   }
}
Treasure Dev
  • 560
  • 4
  • 8