Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_npc_big_cactus_Step_0

(view raw script w/o annotations or w/e)
1
if (scr_interact
scr_interact

function scr_interact() { if (distance_to_object(obj_pl) < 20 && obj_pl.state == 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; } }
() && keyboard_multicheck_pressed(0))
2
{
3
    scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
4
    if (global.geno_complete[3] || global.route == 3)
5
    {
6
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
7
        with (msg)
8
            message[0] = "(They're asleep...)";
9
        exit;
10
    }
11
    if (global.party_member != -4 && global.dunes_flag[41] > 0)
12
    {
13
        with (msg)
14
        {
15
            sndfnt = 102;
16
            message[0] = "* (We need to stay#  focused.)";
17
            message[1] = "* (Let's not bother others#  with our problems.)";
18
            prt[0] = 321;
19
            prt[1] = 338;
20
        }
21
        exit;
22
    }
23
    is_talking = 1;
24
    waiter = 1;
25
}
26
if (waiter == 1)
27
{
28
    if (global.dunes_flag[17] == 0)
29
    {
30
        with (msg)
31
        {
32
            message[0] = "* Sorry buddy, this path is#  blocked.";
33
            message[1] = "* I ain't movin' no matter what#  anyone does to provoke me.";
34
            message[2] = "* You wouldn't understand.\t";
35
            message[3] = "* Girlboss behavior.";
36
        }
37
        global.dunes_flag[17] = 1;
38
        waiter = 0;
39
    }
40
    else if (global.dunes_flag[17] == 1)
41
    {
42
        with (msg)
43
        {
44
            message[0] = "* Hey, lil fella... There ain't#  nothin' to see here.";
45
            message[1] = "* Last I checked, anyway.";
46
            message[2] = "* Maybe one day there will be a#  great treasure lyin' beyond my#  hot bod.";
47
            message[3] = "* But as of right now, there is#  only a hot bod.\t";
48
            message[4] = "* Mine.";
49
        }
50
        global.dunes_flag[17] = 2;
51
        waiter = 0;
52
    }
53
    else if (global.dunes_flag[17] == 2)
54
    {
55
        with (msg)
56
        {
57
            message[0] = "* Stone-bathin' is a delicate#  process.";
58
            message[1] = "* The more you make me flap my#  lips the more uneven my tan#  will be.";
59
            message[2] = "* At this rate I'm gonna be a#  whole-ass gradient.";
60
        }
61
        global.dunes_flag[17] = 3;
62
        waiter = 0;
63
    }
64
    else if (global.dunes_flag[17] == 3)
65
    {
66
        with (msg)
67
        {
68
            message[0] = "* Yeah. Uh-huh. Cool. Keep#  disturbin' me. Love it.";
69
            if (message_current == 1)
70
            {
71
                other.is_talking = false;
72
                other.waiter = 0;
73
            }
74
        }
75
    }
76
}
77
if (instance_exists(obj_dialogue) && is_talking == true)
78
{
79
    if (obj_dialogue.cutoff == string_length(obj_dialogue.message[obj_dialogue.message_current]))
80
    {
81
        image_speed = 0;
82
        image_index = 0;
83
    }
84
    else
85
    {
86
        image_speed = 0.2;
87
    }
88
}
89
else
90
{
91
    image_speed = 0;
92
    is_talking = false;
93
}