B
Bokkie2988
Guest
Hello,
I've made a simple 'typing' effect on my text. It looks like this:
create:
step:
draw:
but now the text keeps getting drawn. How do I stop this?
Thanks.
-Bokkie
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;
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();
Code:
DrawSetText(c_white,fontsmaller,fa_center,fa_top);
draw_text(x,y,text_current);
Thanks.
-Bokkie