Undertale script viewer

← back to main script listing

gml_Object_obj_6book_wordbullet_Draw_0

(view raw script w/o annotations or w/e)
1
counter += 1;
2
scr_setfont
scr_setfont

var newfont = argument0; if (global.language == "ja") { if (newfont == fnt_main) newfont = fnt_ja_main; if (newfont == fnt_maintext) newfont = fnt_ja_maintext; if (newfont == fnt_plain) newfont = fnt_ja_plain; } draw_set_font(newfont);
(fnt_maintext);
3
width = string_width(word);
4
factor = 100 / width;
5
draw_set_color(image_blend);
6
draw_text_transformed(x, y, word, factor, 4.2, 0);
7
if (hspeed > 0 && x > 405)
8
    instance_destroy();
9
if (hspeed < 0 && x < 120)
10
    instance_destroy();
11
if (type == 2)
12
{
13
    shake += 0.2;
14
    x += (random(shake) - random(shake));
15
    y += (random(shake) - random(shake));
16
}