Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_flower_pot_Step_0

(view raw script w/o annotations or w/e)
1
if (global.flag[17 Dalv fate] == 1)
2
{
3
    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 && waiter == 0 && (!instance_exists(obj_dialogue)))
4
        waiter = 1
5
    if (waiter == 1)
6
    {
7
        global.cutscene = true
8
        obj_dalv2.destination_x_dalv = obj_dalv2.x
9
        obj_dalv2.destination_y_dalv = obj_dalv2.y
10
        if (obj_dalv2.x == obj_dalv2.destination_x_dalv && obj_dalv2.y == obj_dalv2.destination_y_dalv)
11
            waiter++
12
    }
13
    if (waiter == 2)
14
        image_index = 1
15
    if (waiter == 2)
16
    {
17
        scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
18
        with (msg)
19
        {
20
            if (global.interaction_count_flower_pot == 0)
21
            {
22
                if (!instance_exists(obj_dialoguebox_dummy))
23
                    instance_create(0, 0, obj_dialoguebox_dummy)
24
                portrait = false
25
                sndfnt = 99
26
                message[0] = "* (It's a flower pot full of#  dirt.)"
27
            }
28
            else
29
            {
30
                portrait = true
31
                sndfnt = 100
32
                message[0] = "* ..."
33
                prt[0] = 1755
34
            }
35
        }
36
        waiter++
37
    }
38
    if (waiter == 3 && (!instance_exists(obj_dialogue)))
39
    {
40
        if (global.interaction_count_flower_pot == 0)
41
        {
42
            obj_dalv2.direction = 0
43
            global.interaction_count_flower_pot++
44
            waiter++
45
        }
46
        else
47
            waiter = 7
48
    }
49
    if (waiter == 4)
50
    {
51
        scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
52
        with (msg)
53
        {
54
            portrait = true
55
            sndfnt = 100
56
            message[0] = "* That's my turnip plant!"
57
            message[1] = "* He should be sprouting#  up any day now!"
58
            message[2] = "* ... He's really taking#  his time..."
59
            message[3] = "* But I don't rush him."
60
            prt[0] = 1776
61
            prt[1] = 1776
62
            prt[2] = 1780
63
            prt[3] = 1769
64
        }
65
        waiter++
66
    }
67
    if (waiter >= 5 && waiter <= 6 && (!instance_exists(obj_dialogue)))
68
    {
69
        obj_dalv2.destination_x_dalv = obj_dalv2.default_x_dalvshouse
70
        obj_dalv2.destination_y_dalv = obj_dalv2.default_y_dalvshouse
71
        if (obj_dalv2.x == obj_dalv2.default_x_dalvshouse && obj_dalv2.y == obj_dalv2.default_y_dalvshouse)
72
            waiter++
73
        with (obj_dialoguebox_dummy)
74
            instance_destroy()
75
    }
76
    if (waiter == 7)
77
    {
78
        global.cutscene = false
79
        waiter = 0
80
        obj_pl.alarm[0] = 1
81
    }
82
}
83
else if (global.flag[17 Dalv fate] != 1 && global.route != 3)
84
{
85
    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 && waiter == 0 && (!instance_exists(obj_dialogue)))
86
        waiter = 1
87
    if (waiter == 1)
88
    {
89
        scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
90
        with (msg)
91
        {
92
            portrait = false
93
            sndfnt = 99
94
            message[0] = "* (It's a flower pot full of#  dirt.)"
95
            obj_flower_pot.waiter = 2
96
        }
97
    }
98
    if (waiter == 2 && (!instance_exists(obj_dialogue)))
99
    {
100
        global.cutscene = false
101
        waiter = 0
102
        obj_pl.alarm[0] = 1
103
    }
104
}
105
else if (global.route == 3)
106
{
107
    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 && waiter == 0 && (!instance_exists(obj_dialogue)))
108
        waiter = 1
109
    if (waiter == 1)
110
    {
111
        scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
112
        with (msg)
113
        {
114
            portrait = false
115
            sndfnt = 99
116
            message[0] = "* (Dirt.)"
117
            obj_flower_pot.waiter = 2
118
        }
119
    }
120
    if (waiter == 2 && (!instance_exists(obj_dialogue)))
121
    {
122
        global.cutscene = false
123
        waiter = 0
124
        obj_pl.alarm[0] = 1
125
    }
126
}