Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_wild_east_ceroba_cool_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
    msg.sndfnt = 108;
5
    msg.message[0] = "* ...";
6
    msg.prt[0] = 370;
7
}
8
switch (scene)
9
{
10
    case 0:
11
        cutscene_npc_walk_relative(1168, 0, 10, 0.5, "y", "down");
12
        break;
13
    case 1:
14
        sprite_index = spr_ceroba_cool_alt;
15
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
16
        with (msg)
17
        {
18
            sndfnt = 108;
19
            message[0] = "* You there. Human.";
20
            message[1] = "* You okay?";
21
            prt[0] = 377;
22
            prt[1] = 370;
23
            ch_msg = 1;
24
            ch[1] = "Yeah";
25
            ch[2] = "Not\nreally";
26
            if (outcome == 1)
27
            {
28
                message[2] = "* Really?";
29
                message[3] = "* Well... alright then.";
30
                prt[2] = 393;
31
                prt[3] = 377;
32
            }
33
            if (outcome == 2)
34
            {
35
                message[2] = "* About what I expected.";
36
                prt[2] = 377;
37
            }
38
        }
39
        if (msg.message_current == 1)
40
            obj_player_npc.npc_direction = "right";
41
        if (!global.dialogue_open)
42
            scene++;
43
        break;
44
    case 2:
45
        if (!audio_is_playing(mus_blossom))
46
            audio_play_sound(mus_blossom, 1, 1);
47
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
48
        if (global.route == 2)
49
        {
50
            with (msg)
51
            {
52
                color = true;
53
                col_modif[0] = make_color_rgb(237, 140, 36);
54
                sndfnt = 108;
55
                message[0] = "* I apologize for Star's#  antics.";
56
                message[1] = "* He's really into human#  culture and whatnot.";
57
                message[2] = "* You show up here and he#  flips out.";
58
                message[3] = "* I mean, it is quite#  unbelievable.";
59
                message[4] = "* A few humans have#  wandered into the#  Underground before but...";
60
                message[5] = "* They never set foot on#  these sands.";
61
                message[6] = "* All that to say, I'm#  glad you did.";
62
                message[7] = "* My name is Ceroba.";
63
                message_col[7][0] = "             Ceroba ";
64
                message[8] = "* I'm a friend of Star's#  but not part of his#  posse.";
65
                message[9] = "* They're a bit too...#  rowdy for my taste.";
66
                message[10] = "* May I ask your name?";
67
                ch_msg = 10;
68
                ch[1] = "Clover";
69
                message[11] = "* Welcome to the#  Underground, Clover.";
70
                message[12] = "* Your attire is#  surprising, I must say.";
71
                message[13] = "* But um... I won't press#  you on the matter.";
72
                message[14] = "* I'm afraid Star is going#  to drag you into his#  activities for a while.";
73
                message[15] = "* You must have places to#  go, correct?";
74
                message[16] = "* The Castle... the#  barrier. You probably#  want to go home.";
75
                message[17] = "* If I'm being honest, I#  haven't seen Star this#  ecstatic in some time.";
76
                message[18] = "* Maybe you should#  entertain him a bit;#  roll with his punches.";
77
                message[19] = "* I'll see what I can do#  about allowing you to#  leave.";
78
                message[20] = "* I know of a safe path#  to Hotland through#  the...";
79
                message[21] = "* Ah, I'm getting ahead#  of myself.";
80
                message[22] = "* Talk to you later,#  Clover.";
81
                message[23] = "* It was nice to#  meet you.";
82
                prt[0] = 377;
83
                prt[1] = 370;
84
                prt[2] = 370;
85
                prt[3] = 377;
86
                prt[4] = 371;
87
                prt[5] = 370;
88
                prt[6] = 395;
89
                prt[7] = 372;
90
                prt[8] = 372;
91
                prt[9] = 374;
92
                prt[10] = 372;
93
                prt[11] = 372;
94
                prt[12] = 395;
95
                prt[13] = 370;
96
                prt[14] = 371;
97
                prt[15] = 370;
98
                prt[16] = 371;
99
                prt[17] = 371;
100
                prt[18] = 372;
101
                prt[19] = 372;
102
                prt[20] = 371;
103
                prt[21] = 393;
104
                prt[22] = 372;
105
                prt[23] = 372;
106
                if (message_current == 23)
107
                {
108
                    scr_audio_fade_out
scr_audio_fade_out

function scr_audio_fade_out(arg0, arg1) { var snd = arg0; var fade_len = arg1; if (!audio_is_playing(snd)) return false; audio_sound_gain(snd, 0, fade_len); if (instance_exists(obj_audio_fade_helper)) { with (obj_audio_fade_helper) { if (audio_to_fade == snd) return false; } } with (instance_create(0, 0, obj_audio_fade_helper)) audio_to_fade = snd; }
(176, 300);
109
                    other.scene++;
110
                }
111
            }
112
        }
113
        else
114
        {
115
            with (msg)
116
            {
117
                color = true;
118
                col_modif[0] = make_color_rgb(237, 140, 36);
119
                sndfnt = 108;
120
                message[0] = "* I apologize for Star's#  antics.";
121
                message[1] = "* He's really into human#  culture and whatnot.";
122
                message[2] = "* You show up here and he#  flips out.";
123
                message[3] = "* I mean, it is quite#  unbelievable.";
124
                message[4] = "* A few humans have#  wandered into the#  Underground before but...";
125
                message[5] = "* They never set foot on#  these sands.";
126
                message[6] = "* My name is Ceroba.";
127
                message_col[6][0] = "             Ceroba ";
128
                message[7] = "* I'm a friend of Star's#  but not part of his#  posse.";
129
                message[8] = "* They're a bit too...#  rowdy for my taste.";
130
                message[9] = "* May I ask your name?";
131
                ch_msg = 9;
132
                ch[1] = "Clover";
133
                message[10] = "* Welcome to the#  Underground, Clover.";
134
                message[11] = "* Your attire is#  surprising, I must say.";
135
                message[12] = "* But um... I won't press#  you on the matter.";
136
                message[13] = "* I'm afraid Star is going#  to drag you into his#  activities for a while.";
137
                message[14] = "* You must have places to#  go, correct?";
138
                message[15] = "* The Castle... the#  barrier. You probably#  want to go home.";
139
                message[16] = "* If I'm being honest, I#  haven't seen Star this#  ecstatic in some time.";
140
                message[17] = "* Maybe you should#  entertain him a bit;#  roll with his punches.";
141
                message[18] = "* He'll probably allow#  you to leave eventually.";
142
                message[19] = "* Well...";
143
                message[20] = "* Good luck, Clover.";
144
                prt[0] = 377;
145
                prt[1] = 370;
146
                prt[2] = 370;
147
                prt[3] = 377;
148
                prt[4] = 371;
149
                prt[5] = 371;
150
                prt[6] = 372;
151
                prt[7] = 372;
152
                prt[8] = 374;
153
                prt[9] = 372;
154
                prt[10] = 372;
155
                prt[11] = 395;
156
                prt[12] = 370;
157
                prt[13] = 371;
158
                prt[14] = 370;
159
                prt[15] = 371;
160
                prt[16] = 374;
161
                prt[17] = 372;
162
                prt[18] = 372;
163
                prt[19] = 395;
164
                prt[20] = 372;
165
                if (message_current == 20)
166
                {
167
                    scr_audio_fade_out
scr_audio_fade_out

function scr_audio_fade_out(arg0, arg1) { var snd = arg0; var fade_len = arg1; if (!audio_is_playing(snd)) return false; audio_sound_gain(snd, 0, fade_len); if (instance_exists(obj_audio_fade_helper)) { with (obj_audio_fade_helper) { if (audio_to_fade == snd) return false; } } with (instance_create(0, 0, obj_audio_fade_helper)) audio_to_fade = snd; }
(176, 1500);
168
                    other.scene++;
169
                }
170
            }
171
        }
172
        break;
173
    case 3:
174
        if (global.dialogue_open)
175
            exit;
176
        global.dunes_flag[21] = 1;
177
        scene = 4;
178
        scr_radio_restart
scr_radio_restart

function scr_radio_restart() { with (obj_radio) event_user(0); }
();
179
        scr_radio_fade
scr_radio_fade

function scr_radio_fade(arg0, arg1) { var fade_vol = arg0; var fade_len = arg1; with (obj_radio) audio_sound_gain(current_song, fade_vol, fade_len); }
(1, 0);
180
        sprite_index = spr_ceroba_cool;
181
        scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
182
        instance_destroy(obj_player_npc);
183
        break;
184
}