Undertale script viewer

← back to main script listing

gml_Object_obj_triswitch_Step_1

(view raw script w/o annotations or w/e)
1
if (myinteract == 1 && on == 0 && instance_exists(obj_triswitchevent))
2
{
3
    con = 1;
4
    on = 1;
5
    myinteract = 2;
6
    snd_play(snd_noise);
7
    sprite_index = spr_onoffswitch_on;
8
    alarm[3] = 90;
gml_Object_obj_triswitch_Alarm_3.gml

myinteract = 0; on = 0; sprite_index = spr_onoffswitch_off;
9
}
10
if (on == 1 && instance_exists(obj_triswitchevent))
11
    obj_triswitchevent.switches += 1;