Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_miner_bryan_Step_0

(view raw script w/o annotations or w/e)
1
if (global.dunes_flag[7] == 1)
2
{
3
    if (image_index >= (image_number - 1))
4
    {
5
        global.dunes_flag[7] = 2;
6
        alarm[0] = 35;
gml_Object_obj_miner_bryan_Alarm_0.gml

scr_text(); is_talking = 1; with (msg) { message[0] = "* You... you found my hat!"; message[1] = "* You are a kind soul!"; message[2] = "* I don't have anything to give# you... but I am eternally# grateful."; } hat_text = true; npc_flag = 3;
7
        image_speed = 0;
8
        sprite_index = spr_miner_bryan_alt;
9
    }
10
    exit;
11
}
12
event_inherited();
13
if (interact)
14
{
15
    scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
16
    is_talking = 1;
17
    switch (npc_flag)
18
    {
19
        case 0:
20
            with (msg)
21
            {
22
                portrait = false;
23
                sndfnt = 99;
24
                message[0] = "* I lost all of my TNT...";
25
                message[1] = "* I have to tell the Foreman.";
26
                message[2] = "* He'll fire me, I'm sure, but#  it's my fault.";
27
                message[3] = "* I would go tell him right now,#  but I lost my hard hat as well.";
28
                message[4] = "* I can't protect my dome from#  the hazardous rocks outside.";
29
                message[5] = "* Today isn't my day...";
30
            }
31
            npc_flag++;
32
            break;
33
        case 1:
34
            with (msg)
35
            {
36
                portrait = false;
37
                sndfnt = 99;
38
                message[0] = "* I have a brother, you see.";
39
                message[1] = "* I work at the Mines to provide#  for us.";
40
                message[2] = "* He doesn't have a job. Mostly#  just gets into mischief.";
41
                message[3] = "* But... he's happy, so I'm happy.";
42
                message[4] = "* How will I be able to look him#  in the face after I get fired?";
43
            }
44
            npc_flag++;
45
            break;
46
        case 2:
47
            with (msg)
48
            {
49
                portrait = false;
50
                sndfnt = 99;
51
                message[0] = "* Today isn't my day...";
52
            }
53
            break;
54
        case 3:
55
            with (msg)
56
            {
57
                message[0] = "* I know I said I would go tell#  the Foreman but...";
58
                message[1] = "* I'm pretty scared.";
59
                message[2] = "* A few more minutes in my#  uniform won't hurt.";
60
            }
61
    }
62
}
63
if (hat_text == true && !global.dialogue_open)
64
{
65
    instance_destroy(obj_dialogue);
66
    global.cutscene = false;
67
    scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
68
    is_talking = false;
69
    with (msg)
70
        message[0] = "* (You got eternal gratitude!)";
71
    audio_play_sound(snd_success, 1, 0);
72
    hat_text = false;
73
}