Legacy GM SOLVED

Y

yarala

Guest
upload_2018-11-16_20-24-11.png i want than i left distance text got hidden
and not than key is released
 
C

CedSharp

Guest
If you want your textbox to stay visible when you release the keyboard key, then you need a way to remember if the textbox is open it not.

In the create event, add this
Code:
textbox_visible = false;
In the step event, put your logic:
Code:
if(distance_to_object(oPlayer) <= 50) {
  if(keyboard_check_pressed(ord("Z"))
    textbox_visible = true;
}
else textbox_visible = false;
And finally put the drawing logic in the draw event:
Code:
if(textbox_visible) {
  draw_sprite(sBox, 0, x, y);
  draw_text_ext(x, y, text, stringHeight, boxWidth);
}
Hope this helps
 
Top