Undertale script viewer

← back to main script listing

gml_Object_obj_sans_prefinaldate_Step_0

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

myinteract = 3; global.msc = 0; global.typer = 17; global.facechoice = 3; global.faceemotion = 0; global.msg[0] =
* grievous errorWait for inputClose MessageClose Message
scr_gettext("obj_sans_prefinaldate_127")
; if (global.flag[413 dated_sans2] == 0) global.msc = 760; mydialoguer = instance_create(0, 0, obj_dialoguer); talkedto += 1;
5
    myinteract = 2;
6
}
7
if (myinteract == 3)
8
{
9
    if (instance_exists(mydialoguer) == 0 && con == 0)
10
    {
11
        global.interact = 0;
12
        myinteract = 0;
13
    }
14
}
15
if (con == 1 && instance_exists(OBJ_WRITER) == 0)
16
{
17
    obj_mainchara.cutscene = 1;
18
    view_object[0] = -4;
19
    con = 2;
20
    alarm[4] = 10;
21
    global.interact = 1;
22
}
23
if (con == 2)
24
    global.interact = 1;
25
if (con == 3)
26
{
27
    rface = global.facing;
28
    if (obj_mainchara.x < x && obj_mainchara.y < (y + 15))
29
    {
30
        global.facing = 0;
31
        obj_mainchara.image_speed = 0.25;
32
        obj_mainchara.vspeed = 3;
33
        con = 2.9;
34
        alarm[4] = 6;
35
    }
36
    else
37
    {
38
        con = 3.9;
39
    }
40
}
41
if (con == 3.9)
42
{
43
    global.facing = rface;
44
    obj_mainchara.image_speed = 0;
45
    obj_mainchara.vspeed = 0;
46
    sprite_index = lsprite;
47
    image_speed = 0.25;
48
    hspeed = -3;
49
    con = 4;
50
    alarm[4] = 10;
51
}
52
if (con == 5)
53
{
54
    global.facing = 3;
55
    scr_npc_halt
scr_npc_halt

image_index = 0; image_speed = 0; hspeed = 0; vspeed = 0; npcdir = 0; if (argument0 == "u") sprite_index = usprite; if (argument0 == "d") sprite_index = dsprite; if (argument0 == "l") sprite_index = lsprite; if (argument0 == "r") sprite_index = rsprite;
("d");
56
    con = 6;
57
    alarm[4] = 30;
58
}
59
if (con == 7)
60
{
61
    instance_create(0, 0, obj_musfadeout);
62
    sprite_index = dsprite;
63
    image_index = 0;
64
    global.msc = 0;
65
    global.facechoice = 3;
66
    global.msg[0] = 
* over here.Delay 11
* i know a shortcut.Wait for inputClose MessageClose Message
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("obj_sans_prefinaldate_297")
;
67
    instance_create(0, 0, obj_dialoguer);
68
    con = 8;
69
    m1 = 0;
70
    m2 = 0;
71
}
72
if (con == 8 && instance_exists(OBJ_WRITER) == 0)
73
{
74
    if (m1 == 0)
75
    {
76
        sprite_index = lsprite;
77
        hspeed = -3;
78
        image_speed = 0.25;
79
        obj_mainchara.hspeed = -3;
80
        global.facing = 3;
81
        obj_mainchara.image_speed = 0.25;
82
        m1 = 1;
83
        m2 = 1;
84
    }
85
    if (m1 == 1)
86
    {
87
        if (x <= 53)
88
        {
89
            x = 50;
90
            vspeed = -3;
91
            hspeed = 0;
92
            sprite_index = usprite;
93
            m1 = 2;
94
        }
95
    }
96
    if (m2 == 1)
97
    {
98
        if (obj_mainchara.x <= 53)
99
        {
100
            obj_mainchara.x = 50;
101
            obj_mainchara.vspeed = -3;
102
            obj_mainchara.hspeed = 0;
103
            global.facing = 2;
104
            m2 = 2;
105
            con = 13;
106
            alarm[4] = 45;
107
        }
108
    }
109
}
110
if (con == 14)
111
{
112
    event_user(2);
113
    con = 15;
114
}