Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_dunes_29b_controller_neutral_geno_Step_0

(view raw script w/o annotations or w/e)
1
switch scene
2
{
3
    case 0:
4
        if (obj_pl.x > 300)
5
        {
6
            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 }
()
7
            audio_sound_gain(obj_radio.current_song, 0, 360)
8
            flowey = instance_create(360, obj_pl.y, obj_dunes_32_flowey)
9
            timer = 40
10
            scene++
11
        }
12
        break
13
    case 1:
14
        if (!scr_timer
scr_timer

function scr_timer() //gml_Script_scr_timer { if (timer > 0) { timer-- return false; } else return true; }
())
15
            return;
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
        with (msg)
18
        {
19
            sndfnt = 96
20
            message[0] = "* Howdy!	"
21
            message[1] = "* Gee, looks like we're#  getting close to an exit#  from this place.	"
22
            message[2] = "* Aside from those mines,#  time has been pretty#  friendly to us.	"
23
            message[3] = "* Should be a simple#  journey from here on ou-"
24
            prt[0] = 348
25
            prt[1] = 347
26
            prt[2] = 348
27
            prt[3] = 348
28
            message[4] = "* There you are!"
29
            talker[0] = other.flowey
30
            position = 1
31
            if (message_current == 3)
32
            {
33
                skippable = false
34
                if (cutoff >= string_length(message[message_current]))
35
                {
36
                    other.scene++
37
                    other.timer = 60
38
                    other.flowey.is_talking = false
39
                    sndfnt = 102
40
                    portrait = false
41
                    message_current += 1
42
                    cutoff = 0
43
                }
44
            }
45
        }
46
        break
47
    case 2:
48
        if scr_timer
scr_timer

function scr_timer() //gml_Script_scr_timer { if (timer > 0) { timer-- return false; } else return true; }
()
49
        {
50
            scene++
51
            timer = 15
52
            instance_destroy(msg)
53
        }
54
        break
55
    case 3:
56
        if (!scr_timer
scr_timer

function scr_timer() //gml_Script_scr_timer { if (timer > 0) { timer-- return false; } else return true; }
())
57
            return;
58
        scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
59
        with (msg)
60
        {
61
            sndfnt = 96
62
            message[0] = "* You gotta be kidding#  me."
63
            prt[0] = 351
64
            talker[0] = other.flowey
65
            position = 1
66
        }
67
        if (!global.dialogue_open)
68
            scene++
69
        break
70
    case 4:
71
        with (flowey)
72
        {
73
            sprite_index = spr_floweyleave
74
            image_speed = 0.2
75
        }
76
        timer = 20
77
        scene++
78
        break
79
    case 5:
80
        if (!scr_timer
scr_timer

function scr_timer() //gml_Script_scr_timer { if (timer > 0) { timer-- return false; } else return true; }
())
81
            return;
82
        if (!instance_exists(obj_martlet_dunes_32))
83
            martlet = instance_create(((__view_get((0 << 0), 0)) + 320 + 40), obj_pl.y, obj_martlet_dunes_32)
84
        if martlet.npc_arrived
85
        {
86
            martlet.npc_arrived = false
87
            scene++
88
        }
89
        break
90
    case 6:
91
        scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
92
        with (msg)
93
        {
94
            ch_msg = 9
95
            ch[1] = "Okay"
96
            ch[2] = "..."
97
            sndfnt = 102
98
            talker[0] = other.martlet
99
            message[0] = "* How are you holding#  up?	"
100
            message[1] = "* ...	"
101
            message[2] = "* Look, I can't forgive#  you for what you did.#  Not yet.	"
102
            message[3] = "* I sense goodness in you#  though. A want to#  correct your mistakes.	"
103
            message[4] = "* You were only defending#  yourself back there,#  right?	"
104
            message[5] = "* ...	"
105
            message[6] = "* Well, wallowing in the#  past won't do any good.	"
106
            message[7] = "* I want to help you. I#  believe in you."
107
            message[8] = "* ...I also let you#  escape in Snowdin so...#  I'm in too deep."
108
            message[9] = "* What do you say?"
109
            prt[0] = 320
110
            prt[1] = 329
111
            prt[2] = 317
112
            prt[3] = 320
113
            prt[4] = 320
114
            prt[5] = 329
115
            prt[6] = 321
116
            prt[7] = 321
117
            prt[8] = 338
118
            prt[9] = 328
119
            position = 1
120
            if (outcome == 1)
121
            {
122
                message[10] = "* Sounds good."
123
                prt[10] = 312
124
            }
125
            if (outcome == 2)
126
            {
127
                message[10] = "* I'll take that as a#  yes."
128
                message[11] = "* This will be good for#  both of us."
129
                prt[10] = 320
130
                prt[11] = 328
131
            }
132
        }
133
        if (!global.dialogue_open)
134
            scene++
135
        break
136
    case 7:
137
        scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
138
        with (msg)
139
        {
140
            ch_msg = 4
141
            ch[1] = "Okay"
142
            ch[2] = "Uh..."
143
            sndfnt = 102
144
            talker[0] = other.martlet
145
            message[0] = "* Let's turn over a new#  leaf, okay?"
146
            message[1] = "* Lead the way."
147
            prt[0] = 328
148
            prt[1] = 312
149
            position = 1
150
        }
151
        if (!global.dialogue_open)
152
            scene++
153
        break
154
    case 8:
155
        with (martlet)
156
        {
157
            x_dest[0] = obj_pl.x - 20
158
            y_dest[0] = obj_pl.y
159
            end_direction = "right"
160
            can_walk = true
161
            if npc_arrived
162
                other.scene++
163
        }
164
        break
165
    case 9:
166
        with (instance_create(martlet.x, martlet.y, obj_martlet_follower))
167
            npc_reset = true
168
        global.party_member = 1170
169
        instance_destroy(martlet)
170
        audio_sound_gain(obj_radio.current_song, 1, 800)
171
        scene++
172
        break
173
    case 10:
174
        global.dunes_flag[16] = 1
175
        global.kill_number[3] = 20
176
        scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() //gml_Script_scr_cutscene_end { global.cutscene = false obj_pl.alarm[0] = 1 }
()
177
        scene = 11
178
        break
179
    case 11:
180
        break
181
}