Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_npc_rephil_break_4_Step_0

(view raw script w/o annotations or w/e)
1
event_inherited();
2
var rephil_col = make_color_rgb(211, 231, 221);
3
depth = -room_height;
4
if (interact)
5
{
6
    is_talking = 1;
7
    waiter = 1;
8
    global.cutscene = true;
9
}
10
if (waiter == 0)
11
{
12
    if (sprite_index != spr_rephil_turn_overworld_yellow)
13
    {
14
        sprite_index = spr_rephil_turn_overworld_yellow;
15
        image_index = 4;
16
    }
17
    if (image_index <= 2)
18
    {
19
        image_index = 2;
20
        image_speed = 0;
21
    }
22
    else
23
    {
24
        image_speed = -0.2;
25
    }
26
}
27
if (waiter > 0)
28
{
29
    if (waiter == 1)
30
    {
31
        if (image_index >= 4)
32
        {
33
            sprite_index = spr_rephil_overworld_yellow;
34
            image_speed = 0;
35
            waiter = 2;
36
        }
37
        else
38
        {
39
            image_speed = 0.2;
40
        }
41
        exit;
42
    }
43
    scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
44
    switch (npc_flag)
45
    {
46
        case 0:
47
            with (msg)
48
            {
49
                talker[0] = other.object_index;
50
                color = true;
51
                col_modif[0] = rephil_col;
52
                message[0] = "* 'Ey, would ya' look at that! If#  it ain't our fresh recruit.";
53
                message[1] = "* How's it goin' kid, you givin'#  the shufflers a good name out#  'ere?";
54
                message[2] = "* Ya' know, it's tough being a#  world renowned gang leader.";
55
                message[3] = "* I gotta run 'round the#  Underground every now 'n then.";
56
                message[4] = "* Make sure we're being properly#  represented, ya' know?";
57
                message[5] = "* Ya' ain't gettin' respect like#  us by lazin' around, kid.";
58
                for (var i = 0; i < array_length(message); i++)
59
                    message_col[i][0] = message[i];
60
            }
61
            break;
62
        case 1:
63
            with (msg)
64
            {
65
                talker[0] = other.object_index;
66
                color = true;
67
                col_modif[0] = rephil_col;
68
                message[0] = "* 'Ey kid. 'Ave you seen a#  certain associate 'round?";
69
                message[1] = "* A fancy lil' fella. Wears a#  nice suit 'n a stubby hat. ";
70
                message[2] = "* We've got some matters to#  discuss with 'em.";
71
                for (var i = 0; i < array_length(message); i++)
72
                    message_col[i][0] = message[i];
73
            }
74
            break;
75
        case 2:
76
            with (msg)
77
            {
78
                talker[0] = other.object_index;
79
                color = true;
80
                col_modif[0] = rephil_col;
81
                message[0] = "* This town 'ere's pretty nice.#  Though, I'm not fond of#  the local gang.";
82
                message[1] = "* They think they're the hot#  stuff but they've got nothin'#  on The Shufflers!";
83
                for (var i = 0; i < array_length(message); i++)
84
                    message_col[i][0] = message[i];
85
            }
86
            break;
87
    }
88
    if (!global.dialogue_open)
89
    {
90
        waiter = 0;
91
        global.cutscene = false;
92
        if (npc_flag < 2)
93
            npc_flag++;
94
    }
95
}