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() //gml_Script_scr_interact { if (distance_to_object(obj_pl) < 20 && obj_pl.state == gml_Script_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() //gml_Script_scr_cutscene_start { global.cutscene = true obj_pl.state = gml_Script_scr_frozen_state obj_pl.image_index = 0 obj_pl.image_speed = 0 }
()
6
    scr_text
scr_text

function scr_text() //gml_Script_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
            other.waiter = 2
41
        else if (outcome == 2 && message_current == 0)
42
        {
43
            other.waiter = 4
44
            instance_destroy()
45
        }
46
    }
47
}
48
if (waiter == 2 && (!instance_exists(obj_dialogue)))
49
{
50
    if (timer == -1)
51
        timer = 30
52
}
53
if (waiter == 3)
54
{
55
    scr_text
scr_text

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

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