Undertale script viewer

← back to main script listing

gml_Object_obj_stable_Draw_0

(view raw script w/o annotations or w/e)
1
draw_sprite(sprite_index, 0, x, y);
2
if (open == 2)
3
    draw_sprite(sprite_index, 1, x, y);
4
if (open == 1)
5
{
6
    dist = distance_to_object(obj_mainchara);
7
    if (dist < 20)
8
    {
9
        disto = 10 / (dist + 1);
10
        if (disto > 1)
11
            disto = 1;
12
        draw_sprite_part_ext(spr_redacted_a, 0, 0, 0, 40, 20, x + 10, y + 10, 1, 1, c_white, disto);
13
    }
14
}
15
if (con == 1 && instance_exists(OBJ_WRITER) == 0)
16
{
17
    con = 2;
18
    open = 1;
19
}
20
if (con == 3 && instance_exists(OBJ_WRITER) == 0)
21
{
22
    con = 4;
23
    open = 2;
24
    snd_play(snd_noise);
25
    with (mysolid)
26
        instance_destroy();
27
}