Undertale script viewer

← back to main script listing

gml_Object_obj_wallmonitor_Step_0

(view raw script w/o annotations or w/e)
1
if (active > 0)
2
{
3
    if (instance_exists(obj_mainchara) && lit == 0)
4
    {
5
        if (obj_mainchara.x > (x - 20) && obj_mainchara.x < (x + 50))
6
        {
7
            lit = 1;
8
            snd_play(snd_squeak);
9
            sprite_index = spr_monitor_lit;
10
            if (active == 2)
11
                sprite_index = spr_monitor_lit_f;
12
        }
13
    }
14
}