• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Windows fixed

B

Bokkie2988

Guest
Hello,
I've made a simple 'typing' effect on my text. It looks like this:
create:
Code:
spd = 0.25;
letters = 0;
text = "Press space to try again.";
length = string_length(text);
text_current = "";
w = 0;
h = 0;
border = 10;
step:
Code:
letters += spd;
text_current = string_copy(text,1,floor(letters));

draw_set_font(fontsmaller);

if (h == 0) h = string_height(text);
w = string_width(text_current);

if (letters >= length) and (keyboard_check_pressed(vk_space)) instance_destroy();
draw:
Code:
DrawSetText(c_white,fontsmaller,fa_center,fa_top);
draw_text(x,y,text_current);
but now the text keeps getting drawn. How do I stop this?
Thanks.

-Bokkie
 
Top