Undertale script viewer

← back to main script listing

gml_Object_obj_sansdoor_Step_0

(view raw script w/o annotations or w/e)
1
if (myinteract == 1)
2
{
3
    if (obj_kitchenchecker.level == 2 || obj_kitchenchecker.level == 1)
4
    {
5
        global.interact = 1;
6
        alarm[0] = 1;
gml_Object_obj_sansdoor_Alarm_0.gml

myinteract = 3; global.msc = 0; global.typer = 5; global.facechoice = 0; global.faceemotion = 0; global.msg[0] =
* (The door is locked.)Wait for inputClose MessageClose Message
scr_gettext("obj_sansdoor_98")
; if (global.flag[497 got_sans_room_key] >= 1) { global.msg[0] =
* (You unlock the door and
enter...)Wait for inputClose MessageClose Message
scr_gettext("obj_sansdoor_102")
; con = 4; } mydialoguer = instance_create(0, 0, obj_dialoguer); talkedto += 1;
7
        myinteract = 2;
8
    }
9
    else
10
    {
11
        myinteract = 0;
12
    }
13
}
14
if (myinteract == 3)
15
{
16
    if (instance_exists(mydialoguer) == 0)
17
    {
18
        global.interact = 0;
19
        myinteract = 0;
20
    }
21
}
22
if (con == 4 && instance_exists(OBJ_WRITER) == 0)
23
{
24
    global.interact = 1;
25
    instance_create(obj_mainchara.x, obj_mainchara.y + 20, obj_door_t);
26
    con = 5;
27
}