Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_hotland_roof_flowey_pellets_Step_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
if (image_alpha < 0.99)
4
{
5
    image_alpha = lerp(image_alpha, 1, 0.2);
6
    exit;
7
}
8
else
9
{
10
    image_alpha = 1;
11
}
12
switch (scene)
13
{
14
    case 1:
15
        speed = lerp(speed, -3, 0.25);
16
        if (speed < -2.9)
17
        {
18
            speed = -3;
19
            scene++;
20
        }
21
        break;
22
    case 2:
23
        speed = lerp(speed, 0, 0.25);
24
        if (speed > -0.1)
25
        {
26
            speed = 0;
27
            scene++;
28
        }
29
        break;
30
    case 3:
31
        break;
32
    case 4:
33
        speed = lerp(speed, 0.5, 0.01);
34
        if (speed > 0.74)
35
            speed = 0.75;
36
        break;
37
}
38
if (point_distance(x, y, obj_pl.x, obj_pl.y) < 10)
39
{
40
    with (obj_hotland_roof_flowey_pellets)
41
        instance_destroy();
42
}