Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_rorrimnpc_Step_0

(view raw script w/o annotations or w/e)
1
script_execute(gml_Script_scr_depth, 0, 0, 0, 0, 0)
2
if (instance_exists(obj_dialogue) && talk == true)
3
{
4
    if (obj_dialogue.cutoff == string_length(obj_dialogue.message[obj_dialogue.message_current]))
5
    {
6
        image_speed = 0
7
        image_index = 0
8
    }
9
    else
10
        image_speed = 0.2
11
}
12
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)
13
{
14
    scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
15
    talk = true
16
    switch global.sideNpc[3]
17
    {
18
        case 0:
19
            with (msg)
20
            {
21
                portrait = false
22
                sndfnt = 99
23
                message[0] = "* This new \"not hiding\" thing#  will take some getting used#  to. "
24
                message[1] = "* I wonder what kind of#  adventures I can go on#  now."
25
            }
26
            global.sideNpc[3] = 1
27
            break
28
        case 1:
29
            with (msg)
30
            {
31
                portrait = false
32
                sndfnt = 99
33
                message[0] = "* I could go out and solve#  the secrets of the entire#  Underground!"
34
                message[1] = "* Meet every monster, brave#  every danger, see everything#  I can!"
35
                message[2] = "* Maybe I'll even find#  a way back to the Surface!#* You never know!"
36
                message[3] = "* Anyone can be a hero.#* Maybe you could be one#  too!"
37
            }
38
            global.sideNpc[3] = 2
39
            break
40
        case 2:
41
            with (msg)
42
            {
43
                portrait = false
44
                sndfnt = 99
45
                message[0] = "* You might wanna get a#  new hat. That one is#  looking a bit worn."
46
            }
47
            break
48
    }
49
50
}
51
if ((!instance_exists(obj_dialogue)) && talk == true)
52
    talk = false