Undertale script viewer

← back to main script listing

gml_Object_obj_asriellamp_Step_2

(view raw script w/o annotations or w/e)
1
if (active == 1)
2
{
3
    if (caster_get_volume(global.currentsong) > idealvolume[0])
4
    {
5
        curvol1 -= 0.05;
6
        if (curvol1 < idealvolume[0])
7
            curvol1 = idealvolume[0];
8
        caster_set_volume(global.currentsong, curvol1);
9
    }
10
    if (caster_get_volume(global.currentsong) < idealvolume[0])
11
    {
12
        curvol1 += 0.05;
13
        if (curvol1 > idealvolume[0])
14
            curvol1 = idealvolume[0];
15
        caster_set_volume(global.currentsong, curvol1);
16
    }
17
    if (caster_get_volume(global.currentsong2) > idealvolume[1])
18
    {
19
        curvol2 -= 0.05;
20
        if (curvol2 < idealvolume[1])
21
            curvol2 = idealvolume[1];
22
        caster_set_volume(global.currentsong2, curvol2);
23
    }
24
    if (caster_get_volume(global.currentsong2) < idealvolume[1])
25
    {
26
        curvol2 += 0.05;
27
        if (curvol2 > idealvolume[1])
28
            curvol2 = idealvolume[1];
29
        caster_set_volume(global.currentsong2, curvol2);
30
    }
31
}