Undertale script viewer

← back to main script listing

gml_Object_obj_doodlebug_body_Draw_0

(view raw script w/o annotations or w/e)
1
siner += 1;
2
draw_sprite_ext(spr_doodleleg, floor(siner / 6), x + 26, y + 84, 2, 2, 0, c_white, image_alpha);
3
draw_sprite_ext(spr_doodlebug, floor(siner / 6), x, y - (sin(siner / 16) * 4), 2, 2, 0, c_white, image_alpha);
4
draw_sprite_ext(spr_doodlearm, floor(siner / 6), x - 16, y + 50 + (sin(siner / 16) * 10), 2, 2, 0, c_white, image_alpha);
5
draw_sprite_ext(spr_doodlearm, floor(siner / 6), x + 106, y + 50 + (sin(siner / 16) * 10), -2, 2, 0, c_white, image_alpha);
6
if (boat >= 1)
7
    draw_sprite_ext(spr_doodleboat, floor(siner / 6), x, (y - (sin(siner / 16) * 4)) + 20, 2, 2, 0, c_white, image_alpha);
8
if (boat == 2)
9
{
10
    if (x < 320)
11
        hspeed = -5;
12
    else
13
        hspeed = 5;
14
}
15
if (fight == 1)
16
{
17
    if (instance_number(obj_doodlebug_body) > 1)
18
    {
19
        if (f_timer == 0)
20
            event_user(0);
21
        if (f_timer == 60)
22
        {
23
            event_user(0);
24
            f_timer = -1;
25
            fight = 0;
26
        }
27
    }
28
    else
29
    {
30
        if (f_timer == 0)
31
            event_user(0);
32
        if (f_timer == 10)
33
            event_user(0);
34
        if (f_timer == 20)
35
        {
36
            event_user(0);
37
            f_timer = -1;
38
            fight = 0;
39
        }
40
    }
41
    f_timer += 1;
42
}
43
if (x < -120)
44
    instance_destroy();
45
if (x > 800)
46
    instance_destroy();