Undertale script viewer

← back to main script listing

gml_Object_obj_musicstatue_Step_1

(view raw script w/o annotations or w/e)
1
scr_depth
scr_depth

depth = 50000 - ((y * 10) + (sprite_height * 10));
(0, 0, 0, 0, 0);
2
if (con == 1)
3
{
4
    con = 2;
5
    musicbox = caster_load("music/musicbox.ogg");
6
    caster_loop(musicbox, 0.25, 0.9);
7
    image_index = 1;
8
    boxactive = 1;
9
    mask.image_index = 1;
10
}
11
if (boxactive == 1 && instance_exists(obj_mainchara))
12
{
13
    disto = distance_to_object(obj_mainchara);
14
    if (disto < 76)
15
        caster_set_volume(musicbox, (100 - disto) / 100);
16
}