Undertale script viewer

← back to main script listing

gml_Object_obj_rollsnow_Step_0

(view raw script w/o annotations or w/e)
1
if (falling == 0)
2
    depth = 50000 - ((y * 10) + (sprite_height * 4));
3
if (instance_exists(obj_mainchara))
4
{
5
    if (vspeed > 0.1)
6
        depth = obj_mainchara.depth - 1;
7
    if (vspeed < -0.1)
8
        depth = obj_mainchara.depth + 1;
9
}
10
if (falling > 0)
11
    depth = 1000;
12
xchange = abs(hspeed);
13
ychange = abs(vspeed);
14
tchange = xchange + ychange;
15
angle += ((tchange * 30) / (size * 10));
16
image_xscale = size;
17
image_yscale = size;
18
if (falling == 1)
19
{
20
    friction = -0.1;
21
    vspeed = 3;
22
    falling = 2;
23
}
24
if (falling == 2 && y > specialy)
25
{
26
    y = specialy;
27
    friction = 0.1;
28
    vspeed = 0;
29
    falling = 0;
30
}
31
if (t == 1 || t == 2)
32
{
33
    if (hspeed == 0 && vspeed == 0)
34
        t = 1;
35
    else
36
        t = 2;
37
}
38
golf = 0;
39
if (t == 1)
40
{
41
    if (shrinko > 0)
42
        shrinko -= 1;
43
    else
44
        size -= 0.01;
45
}
46
if (size < 0.2)
47
{
48
    instance_destroy();
49
    with (obj_rollsnowgen)
50
alarm[0]
51
}
52
if (timeincrease == 1)
53
    rolltime += 1;
54
if (falling == 5 && size >= 0.2)
55
{
56
    size -= 0.05;
57
    depth = 900000;
58
}