Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_snowdin06_puzzlesign_overworld_yellow_Step_0

(view raw script w/o annotations or w/e)
1
if ((keyboard_multicheck_pressed(0) && scr_interact
scr_interact

function scr_interact() { if (distance_to_object(obj_pl) < 20 && obj_pl.state == scr_normal_state) { var pl_dir = obj_pl.direction; var pl_x = 0; var pl_y = 0; var check_distance_x = 0; var check_distance_y = 0; switch (pl_dir) { case 0: pl_x = obj_pl.bbox_right; pl_y = obj_pl.bbox_top + 1; check_distance_x = 20; break; case 180: pl_x = obj_pl.bbox_left; pl_y = obj_pl.bbox_top + 1; check_distance_x = -20; break; case 90: pl_x = obj_pl.x; pl_y = obj_pl.bbox_top; check_distance_y = -20; break; case 270: pl_x = obj_pl.x; pl_y = obj_pl.bbox_bottom; check_distance_y = 20; break; } if (collision_line_first(pl_x, pl_y, pl_x + check_distance_x, pl_y + check_distance_y, id, false, false)) return true; } }
() == true) && waiter == 0)
2
    waiter = 1;
3
if (waiter == 1)
4
{
5
    scr_cutscene_start
scr_cutscene_start

function scr_cutscene_start() { global.cutscene = true; obj_pl.state = scr_frozen_state; obj_pl.image_index = 0; obj_pl.image_speed = 0; }
();
6
    scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
7
    with (msg)
8
    {
9
        sndfnt = 99;
10
        portrait = false;
11
        if (other.npc_flag == 0)
12
        {
13
            message_current = 1;
14
            other.npc_flag = 1;
15
            other.waiter = 2;
16
        }
17
        else
18
        {
19
            ch[1] = "Yes";
20
            ch[2] = "No";
21
            ch_msg = 0;
22
        }
23
        color = true;
24
        col_modif[0] = make_color_rgb(92, 186, 249);
25
        col_modif[1] = 255;
26
        message[0] = "* (Read the instructions again?)";
27
        message[1] = "* To whom it may concern:";
28
        message[2] = "* In accordance with Royal Guard#  guide book section four,#  paragraph two,";
29
        message[3] = "* This puzzle is intended to#  impede the progress of an#  intruder (probably you),";
30
        message[4] = "* Entertain the residents of the#  surrounding area (Snowdin),";
31
        message[5] = "* And appear intimidating to#  would-be intruders or#  wrong-doers,";
32
        message[6] = "* (I'm unclear on what they mean#  by that, just go with it.)";
33
        message[7] = "* To pass by this challenge, you#  must melt the icecube.";
34
        message[8] = "* Make sure the ball-thing gets#  to the bottom without breaking#  though.";
35
        message[9] = "* Signed: Martlet of the#  Underground Royal Guard";
36
        message_col[4][1] = "                                                     Snowdin  ";
37
        message_col[9][0] = "          Martlet                                 ";
38
        message_col[9][1] = "                        #  Underground Royal Guard";
39
        if (outcome == 1 && message_current == 0)
40
        {
41
            other.waiter = 2;
42
        }
43
        else if (outcome == 2 && message_current == 0)
44
        {
45
            other.waiter = 4;
46
            instance_destroy();
47
        }
48
    }
49
}
50
if (waiter == 2 && !instance_exists(obj_dialogue))
51
{
52
    if (timer == -1)
53
        timer = 30;
54
}
55
if (waiter == 3)
56
{
57
    scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
58
    with (msg)
59
    {
60
        sndfnt = 99;
61
        portrait = false;
62
        message[0] = "* P.S.";
63
        message[1] = "* If one of the logs gets stuck,#  just jiggle it a little.";
64
        message[2] = "* I noticed it was sticking the#  other day, but you know how it#  is with D.I.Y. projects.";
65
        message[3] = "* Always something has to go#  wrong!";
66
        message[4] = "* So yeah, just a quick jiggle#  will do!";
67
        message[5] = "* P.P.S.";
68
        message[6] = "* I just realized that you might#  not be able to reach the log to#  jiggle it!";
69
        message[7] = "* I mean, not everyone can fly,#  or is freakishly tall!";
70
        message[8] = "* Especially if you're a human or#  something!";
71
        message[9] = "* So just hope it doesn't get#  stuck!";
72
        message[10] = "* P.P.P.S.";
73
        message[11] = "* I figured it out!";
74
        message[12] = "* If it gets stuck, just wait!";
75
        message[13] = "* I come around to inspect the#  puzzle quality every third day!";
76
        message[14] = "* Just hang out right where you#  are for a day or two!";
77
        message[15] = "* Oh, and hope it doesn't get#  stuck!";
78
        message[16] = "* P.P.P.P.S.";
79
        message[17] = "* I have been informed that the#  amount of P.S.'s on this sign#  is \"unseemly.\"";
80
        message[18] = "* I am very sorry for any trouble#  they've caused.";
81
    }
82
    if (global.dialogue_open == false)
83
        waiter = 4;
84
}
85
if (waiter == 4)
86
{
87
    if (npc_flag == 0)
88
        npc_flag = 1;
89
    waiter = 0;
90
    scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
91
}
92
if (timer > 0)
93
{
94
    timer--;
95
}
96
else if (timer != -1)
97
{
98
    waiter = 3;
99
    timer = -1;
100
}
101
if (ds_map_find_value(global.npc_map, npc_id) != npc_flag)
102
    ds_map_replace(global.npc_map, npc_id, npc_flag);