Undertale script viewer

← back to main script listing

gml_Object_obj_snowhat_Step_2

(view raw script w/o annotations or w/e)
1
if (instance_exists(obj_mainchara))
2
{
3
    x = obj_mainchara.x - 1;
4
    y = obj_mainchara.y - 15;
5
    d = 0;
6
    if (global.interact == 0)
7
        d = 1;
8
    if (d == 1)
9
    {
10
        instance_create(x + 10, y + 15, obj_snowhatparticle);
11
        repeat (3)
12
        {
13
            grx = choose(1, -1) * random(7);
14
            gry = choose(1, -1) * random(4);
15
            instance_create(x + 10 + grx, y + 12 + gry, obj_snowhatparticle);
16
        }
17
        instance_destroy();
18
    }
19
}