FONT* arial_font = "Arial#20b";
TEXT* mytxt =
{
layer = 1;
pos_x = 100;
pos_y = 100;
string ("qwert yuiop asdfg hjkl zxcvb nm,. n qwert yuiop asdfg hjkl zxcvb nm,");
font = arial_font;
}
void letter_by_letter(TEXT* _temp_field,int _string,int _delay)
{
if(!_temp_field){return;}
STRING* temp_string = "meow";
TEXT* temp_text = txt_create(1,1);
layer_sort(temp_text,_temp_field.layer+1);
temp_text.font = _temp_field.font;
temp_text.pos_x = _temp_field.pos_x;
temp_text.pos_y = _temp_field.pos_y;
temp_text.size_y = _temp_field.size_y;
set(temp_text, SHOW);
reset(_temp_field, SHOW);
int i;
for(i = 0;i<str_len((_temp_field.pstring)[_string]);i++)
{
str_cpy(temp_string,(_temp_field.pstring)[_string]);
str_trunc(temp_string,str_len(temp_string)-i);
str_cpy((temp_text.pstring)[0],temp_string);
wait(_delay);
}
set(_temp_field, SHOW);
ptr_remove(temp_text);
}
void main()
{
level_load(0);
wait(5);
fps_max = 100;
letter_by_letter(mytxt,0,5);
wait(-2);
letter_by_letter(mytxt,0,20);
}