Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_miner_snake_Step_0

(view raw script w/o annotations or w/e)
1
if (sprite_index == spr_miner_snake_eat)
2
{
3
    image_speed = 0.3
4
    if on_animation_end()
5
    {
6
        sprite_index = spr_miner_snake
7
        image_speed = 0
8
        if (!alarm[0])
9
            alarm[0] = 30
alarm[0]

scr_text() is_talking = true with (msg) message[0] = "* You saw nothing." waiter = 0 global.cutscene = false
10
    }
11
    return;
12
}
13
event_inherited()
14
if interact
15
{
16
    scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
17
    is_talking = 1
18
    waiter = 1
19
}
20
if (waiter == 1)
21
{
22
    scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
23
    switch npc_flag
24
    {
25
        case 0:
26
            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 }
()
27
            with (msg)
28
            {
29
                portrait = false
30
                sndfnt = 99
31
                message[0] = "* Hello, visitor."
32
                message[1] = "* Did you venture through the#  whole mine?"
33
                message[2] = "* What a journey."
34
                message[3] = "* For your troubles, I'll let you#  in on a little secret."
35
                message[4] = "* You see, we aren't mining for#  gemstones at all."
36
                message[5] = "* Those things are everywhere;#  practically worthless."
37
                message[6] = "* We're actually mining for#  minerals like this one in front#  of me."
38
                message[7] = "* They're used for building#  materials around the#  Underground, you see."
39
                message[8] = "* They're also... very..."
40
            }
41
            if (!global.dialogue_open)
42
            {
43
                sprite_index = spr_miner_snake_eat
44
                image_speed = 0.5
45
                image_index = 0
46
                npc_flag = 1
47
                waiter = 0
48
                return;
49
            }
50
            break
51
        case 1:
52
            with (msg)
53
                message[0] = "* I'm famished."
54
            waiter = 0
55
            break
56
    }
57
58
}
59
if (is_talking == 1)
60
    sprite_index = spr_miner_snake_talk
61
else
62
    sprite_index = spr_miner_snake