Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_macro_froggit_room_controller_Step_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
switch (scene)
4
{
5
    case 0:
6
        if (global.sworks_flag[47] != 0 && global.sworks_flag[48] != 0 && global.sworks_flag[49] != 0)
7
        {
8
            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; }
(obj_radio.current_song, 500);
9
            scr_cutscene_start
scr_cutscene_start

function scr_cutscene_start() { global.cutscene = true; obj_pl.state = scr_frozen_state; obj_pl.image_index = 0; obj_pl.image_speed = 0; }
();
10
            cutscene_advance();
11
        }
12
        break;
13
    case 1:
14
        cutscene_wait(1);
15
        break;
16
    case 2:
17
        cutscene_camera_move(obj_pl.x, 120, 1);
18
        break;
19
    case 3:
20
        cutscene_wait(1);
21
        break;
22
    case 4:
23
        audio_play_sound(snd_switch, 1, 0);
24
        layer_set_visible("floorlights_middle", true);
25
        cutscene_advance();
26
        break;
27
    case 5:
28
        cutscene_wait(0.3);
29
        break;
30
    case 6:
31
        layer_set_visible("floorlights_middle", false);
32
        cutscene_advance();
33
        break;
34
    case 7:
35
        cutscene_wait(0.3);
36
        break;
37
    case 8:
38
        audio_play_sound(snd_switch, 1, 0);
39
        layer_set_visible("floorlights_middle", true);
40
        cutscene_advance();
41
        break;
42
    case 9:
43
        cutscene_wait(0.5);
44
        break;
45
    case 10:
46
        cutscene_instance_create(obj_pl.x, obj_pl.y, 1168);
47
        break;
48
    case 11:
49
        cutscene_npc_walk(1168, 156, 160, 3, "x", "up");
50
        break;
51
    case 12:
52
        cutscene_wait(1);
53
        break;
54
    case 13:
55
        audio_play_sound(snd_machinery, 1, 0);
56
        audio_play_sound(snd_puzzle_icemelt, 1, 0);
57
        scr_screenshake
scr_screenshake

function scr_screenshake(arg0, arg1) { if (instance_exists(obj_screenshake_player)) exit; with (instance_create(__view_get(e__VW.Object, 0).x, __view_get(e__VW.Object, 0).y, obj_screenshake_player)) {alarm[0] intensity = arg1; } } enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }
(1000, 0.5);
58
        cutscene_advance();
59
        break;
60
    case 14:
61
        cutscene_wait(1);
62
        break;
63
    case 15:
64
        obj_screenshake_player.intensity = 1;
65
        obj_macro_froggit_room_door.image_speed = 1;
66
        audio_stop_sound(snd_machinery);
67
        audio_play_sound(snd_undertale_bigdoor_open, 1, 1);
68
        cutscene_advance();
69
        break;
70
    case 16:
71
        if (obj_macro_froggit_room_door.image_index >= (obj_macro_froggit_room_door.image_number - 1))
72
        {
73
            obj_screenshake_player.intensity = 2;
74
            audio_stop_sound(snd_undertale_bigdoor_open);
75
            audio_play_sound(snd_undertale_impact, 1, 0);
76
            cutscene_advance();
77
        }
78
        break;
79
    case 17:
80
        cutscene_wait(0.1);
81
        break;
82
    case 18:
83
        instance_destroy(obj_screenshake_player);
84
        if (cutscene_wait(2))
85
        {
86
            if (global.route == 3)
87
                scene = 28;
88
        }
89
        break;
90
    case 19:
91
        cutscene_sfx_play(280, 1);
92
        break;
93
    case 20:
94
        cutscene_wait(1);
95
        break;
96
    case 21:
97
        cutscene_instance_create(157, 112, 234);
98
        audio_play_sound(snd_undertale_appear, 1, 0);
99
        break;
100
    case 22:
101
        obj_mfnpcfinal.image_alpha += 0.05;
102
        if (obj_mfnpcfinal.image_alpha >= 1)
103
            cutscene_advance();
104
        break;
105
    case 23:
106
        cutscene_wait(0.5);
107
        break;
108
    case 24:
109
        cutscene_sfx_play(280, 1);
110
        break;
111
    case 25:
112
        cutscene_wait(1.5);
113
        break;
114
    case 26:
115
        cutscene_sfx_play(280, 1);
116
        obj_mfnpcfinal.vspeed = 4;
117
        break;
118
    case 27:
119
        with (obj_mfnpcfinal)
120
        {
121
            if (y >= obj_player_npc.y)
122
            {
123
                global.battle_enemy_name = "macro froggit";
124
                global.exclamation_mark_type = "nothing";
125
                global.battling_enemy = false;
126
                global.battling_boss = true;
127
                global.battle_start = true;
128
                global.current_room_overworld = room_get_name(room);
129
                instance_create(obj_pl.x, obj_pl.y, obj_heart_initiate_battle);
130
                obj_pl.image_alpha = 0;
131
                audio_stop_all();
132
                other.scene++;
133
            }
134
        }
135
        break;
136
    case 28:
137
        chest = instance_create_depth(140, 100, 0, obj_macro_froggit_chest);
138
        chest.image_alpha = 0;
139
        cutscene_advance();
140
        break;
141
    case 29:
142
        audio_play_sound(snd_undertale_appear, 1, 0);
143
        cutscene_advance();
144
        break;
145
    case 30:
146
        with (obj_macro_froggit_chest)
147
        {
148
            if (image_alpha < 1)
149
                image_alpha += 0.1;
150
            else
151
                other.scene++;
152
        }
153
        break;
154
    case 31:
155
        cutscene_wait(0.5);
156
        break;
157
    case 32:
158
        cutscene_sfx_play(383, 1);
159
        break;
160
    case 33:
161
        if (obj_macro_froggit_chest.y < 130)
162
            obj_macro_froggit_chest.y += 2;
163
        else
164
            cutscene_advance();
165
        break;
166
    case 34:
167
        cutscene_wait(1);
168
        break;
169
    case 35:
170
        obj_macro_froggit_room_door.image_speed = -2;
171
        if (!audio_is_playing(snd_rumble))
172
            audio_play_sound(snd_rumble, 1, 1);
173
        if (obj_macro_froggit_room_door.image_index <= 3)
174
        {
175
            cutscene_screenshake(1, 1);
176
            audio_stop_sound(snd_rumble);
177
            audio_play_sound(snd_undertale_thud, 1, 0);
178
            obj_macro_froggit_room_door.image_index = 0;
179
            obj_macro_froggit_room_door.image_speed = 0;
180
            cutscene_advance(36);
181
        }
182
        break;
183
    case 36:
184
        cutscene_wait(1);
185
        break;
186
    case 37:
187
        cutscene_camera_move(obj_pl.x, obj_pl.y, 2);
188
        break;
189
    case 38:
190
        global.sworks_flag[60] = 1;
191
        cutscene_camera_reset();
192
        cutscene_end();
193
        break;
194
}