Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_snowdin_19_icecube_Step_0

(view raw script w/o annotations or w/e)
1
var ball_collider = 1517;
2
if (collision_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, ball_collider, false, true) != -4)
3
{
4
    if (active == false && ball_collider.shrink == false)
5
    {
6
        active = true;
7
        ball_collider.phy_active = false;
8
        ball_collider.phy_position_x = x;
9
        ball_collider.phy_position_y = y - (sprite_get_height(sprite_index) * image_yscale) - 4;
10
        alarm[0] = 15;
gml_Object_obj_snowdin_19_icecube_Alarm_0.gml

audio_play_sound(snd_puzzle_icemelt, 1, 0); instance_create(x, y - 10, part_smoke_puzzle); shrink = true; obj_molten_rock_snowdin_19.shrink = 1;
11
        obj_puzzle_controller_snowdin_19_overworld_yellow.camera_end = true;
12
    }
13
}
14
if (shrink == true)
15
{
16
    image_xscale -= lerp(0, image_xscale, 0.015);
17
    image_yscale -= lerp(0, image_yscale, 0.015);
18
}
19
if (global.snowdin_flag[12] == 0)
20
{
21
    if (image_xscale < 0.85)
22
    {
23
        if (global.snowdin_flag[12] == 0)
24
        {
25
            obj_snowdin_19_watermeter.fill = 1;
26
            if (!instance_exists(part_drops_puzzle))
27
            {
28
                instance_create(290, 220, part_drops_puzzle);
29
                audio_play_sound(snd_water_fill, 1, 0);
30
            }
31
        }
32
    }
33
    if (image_xscale < 0.75)
34
    {
35
        global.snowdin_flag[12] = 1;
36
        shrink = false;
37
        active = false;
38
        obj_puzzle_controller_snowdin_19_overworld_yellow.camera_end = true;
39
        audio_stop_sound(snd_puzzle_woodmove);
40
        instance_destroy(part_smoke_puzzle);
41
    }
42
}
43
if (image_xscale < 0.35)
44
{
45
    obj_snowdin_19_watermeter.fill = 2;
46
    if (!instance_exists(part_drops_puzzle))
47
    {
48
        instance_create(290, 220, part_drops_puzzle);
49
        audio_play_sound(snd_water_fill_2, 1, 0);
50
    }
51
}
52
if (image_xscale < 0.2)
53
{
54
    obj_puzzle_controller_snowdin_19_overworld_yellow.camera_end = true;
55
    audio_stop_sound(snd_puzzle_woodmove);
56
    instance_destroy(part_smoke_puzzle);
57
    instance_destroy();
58
}
59
if (global.snowdin_flag[12] == 2)
60
    instance_destroy();