Deltarune (Chapter 3) script viewer

← back to main script listing

gml_GlobalScript_scr_chefs

(view raw script w/o annotations or w/e)
1
function 
scr_chefs
scr_chefs

function
scr_chefs()
{ if (instance_exists(obj_chefs_game)) return true; else return false; } function scr_chefs_start(arg0) { if (
scr_chefs())
exit; instance_create(0, 0, obj_chefs_init); obj_chefs_game.microgame = arg0; obj_chefs_spawner.firedie = 1; obj_chefs_game.hbx_visible = 0; obj_chefs_game.bananacoins = 0; obj_chefs_spawner.no_fire = 0; switch (obj_chefs_game.microgame) { default: obj_chefs_game.alarm[0] = 60; obj_chefs_game.alarm[1] = 30; obj_chefs_spawner.alarm[0] += 60; obj_chefs_customer_spawner.alarm[0] += 60; break; case 1: var i = 1; with (obj_chefs_spawner) { mode = 1; side = i; freq = 50; alarm[0] visible = false; i = -1; } instance_destroy(obj_chefs_customer_spawner); with (obj_chefs_susie) instance_destroy(); with (obj_chefs_ralsei) instance_destroy(); tinytenna1 = instance_create(140, 200, obj_tenna_chef_marker1); tinytenna2 = instance_create(540, 200, obj_tenna_chef_marker1); tinytenna2.type = 1; with (instance_create(320, 40, obj_chefs_fireguest)) { depth++; visible = false; } obj_chefs_game.timer = 10; obj_chefs_game.timer_max = 10; with (obj_chefs_kris) { mask_index = spr_kris_chef_walk; audio_stop_sound(snd_egg); } break; case 2: instance_destroy(obj_chefs_spawner); instance_destroy(obj_chefs_customer_spawner); instance_destroy(obj_chefs_susie); instance_destroy(obj_chefs_ralsei); with (instance_create(0, -16, obj_chefs_spawner)) alarm[0] var i = 0; repeat (5) { with (instance_create(300, 420, obj_chefs_evilguest)) { alarm[0] image_xscale = 1; image_yscale = 1; ya = 30; xa = 60; xf = 0.15 - (i * 0.01); yf = 0.05 + (i * 0.01); t = (i * 10) + irandom(60); movetype = 1; movespeed = 6 + min(i * 2, 6); } i++; } obj_chefs_game.timer = 16; obj_chefs_game.timer_max = 16; with (obj_chefs_kris) audio_stop_sound(snd_egg); break; case 3: with (obj_chefs_spawner) { if (mode == 0) freq = 30; if (mode == 1) freq = 50; alarm[0] } instance_destroy(obj_chefs_customer_spawner); with (obj_chefs_susie) { with (instance_create(x, y, obj_chefs_vfx)) ...
()
2
{
3
    if (instance_exists(obj_chefs_game))
4
        return true;
5
    else
6
        return false;
7
}
8
9
function scr_chefs_start(arg0)
10
{
11
    if (
scr_chefs
scr_chefs

function
scr_chefs()
{ if (instance_exists(obj_chefs_game)) return true; else return false; } function scr_chefs_start(arg0) { if (
scr_chefs())
exit; instance_create(0, 0, obj_chefs_init); obj_chefs_game.microgame = arg0; obj_chefs_spawner.firedie = 1; obj_chefs_game.hbx_visible = 0; obj_chefs_game.bananacoins = 0; obj_chefs_spawner.no_fire = 0; switch (obj_chefs_game.microgame) { default: obj_chefs_game.alarm[0] = 60; obj_chefs_game.alarm[1] = 30; obj_chefs_spawner.alarm[0] += 60; obj_chefs_customer_spawner.alarm[0] += 60; break; case 1: var i = 1; with (obj_chefs_spawner) { mode = 1; side = i; freq = 50; alarm[0] visible = false; i = -1; } instance_destroy(obj_chefs_customer_spawner); with (obj_chefs_susie) instance_destroy(); with (obj_chefs_ralsei) instance_destroy(); tinytenna1 = instance_create(140, 200, obj_tenna_chef_marker1); tinytenna2 = instance_create(540, 200, obj_tenna_chef_marker1); tinytenna2.type = 1; with (instance_create(320, 40, obj_chefs_fireguest)) { depth++; visible = false; } obj_chefs_game.timer = 10; obj_chefs_game.timer_max = 10; with (obj_chefs_kris) { mask_index = spr_kris_chef_walk; audio_stop_sound(snd_egg); } break; case 2: instance_destroy(obj_chefs_spawner); instance_destroy(obj_chefs_customer_spawner); instance_destroy(obj_chefs_susie); instance_destroy(obj_chefs_ralsei); with (instance_create(0, -16, obj_chefs_spawner)) alarm[0] var i = 0; repeat (5) { with (instance_create(300, 420, obj_chefs_evilguest)) { alarm[0] image_xscale = 1; image_yscale = 1; ya = 30; xa = 60; xf = 0.15 - (i * 0.01); yf = 0.05 + (i * 0.01); t = (i * 10) + irandom(60); movetype = 1; movespeed = 6 + min(i * 2, 6); } i++; } obj_chefs_game.timer = 16; obj_chefs_game.timer_max = 16; with (obj_chefs_kris) audio_stop_sound(snd_egg); break; case 3: with (obj_chefs_spawner) { if (mode == 0) freq = 30; if (mode == 1) freq = 50; alarm[0] } instance_destroy(obj_chefs_customer_spawner); with (obj_chefs_susie) { with (instance_create(x, y, obj_chefs_vfx)) ...
())
12
        exit;
13
    instance_create(0, 0, obj_chefs_init);
14
    obj_chefs_game.microgame = arg0;
15
    obj_chefs_spawner.firedie = 1;
16
    obj_chefs_game.hbx_visible = 0;
17
    obj_chefs_game.bananacoins = 0;
18
    obj_chefs_spawner.no_fire = 0;
19
    switch (obj_chefs_game.microgame)
20
    {
21
        default:
22
            obj_chefs_game.alarm[0] = 60;
23
            obj_chefs_game.alarm[1] = 30;
24
            obj_chefs_spawner.alarm[0] += 60;
25
            obj_chefs_customer_spawner.alarm[0] += 60;
26
            break;
27
        case 1:
28
            var i = 1;
29
            with (obj_chefs_spawner)
30
            {
31
                mode = 1;
32
                side = i;
33
                freq = 50;
34
alarm[0]
35
                visible = false;
36
                i = -1;
37
            }
38
            instance_destroy(obj_chefs_customer_spawner);
39
            with (obj_chefs_susie)
40
                instance_destroy();
41
            with (obj_chefs_ralsei)
42
                instance_destroy();
43
            tinytenna1 = instance_create(140, 200, obj_tenna_chef_marker1);
44
            tinytenna2 = instance_create(540, 200, obj_tenna_chef_marker1);
45
            tinytenna2.type = 1;
46
            with (instance_create(320, 40, obj_chefs_fireguest))
47
            {
48
                depth++;
49
                visible = false;
50
            }
51
            obj_chefs_game.timer = 10;
52
            obj_chefs_game.timer_max = 10;
53
            with (obj_chefs_kris)
54
            {
55
                mask_index = spr_kris_chef_walk;
56
                audio_stop_sound(snd_egg);
57
            }
58
            break;
59
        case 2:
60
            instance_destroy(obj_chefs_spawner);
61
            instance_destroy(obj_chefs_customer_spawner);
62
            instance_destroy(obj_chefs_susie);
63
            instance_destroy(obj_chefs_ralsei);
64
            with (instance_create(0, -16, obj_chefs_spawner))
65
alarm[0]
66
            var i = 0;
67
            repeat (5)
68
            {
69
                with (instance_create(300, 420, obj_chefs_evilguest))
70
                {
71
alarm[0]
72
                    image_xscale = 1;
73
                    image_yscale = 1;
74
                    ya = 30;
75
                    xa = 60;
76
                    xf = 0.15 - (i * 0.01);
77
                    yf = 0.05 + (i * 0.01);
78
                    t = (i * 10) + irandom(60);
79
                    movetype = 1;
80
                    movespeed = 6 + min(i * 2, 6);
81
                }
82
                i++;
83
            }
84
            obj_chefs_game.timer = 16;
85
            obj_chefs_game.timer_max = 16;
86
            with (obj_chefs_kris)
87
                audio_stop_sound(snd_egg);
88
            break;
89
        case 3:
90
            with (obj_chefs_spawner)
91
            {
92
                if (mode == 0)
93
                    freq = 30;
94
                if (mode == 1)
95
                    freq = 50;
96
alarm[0]
97
            }
98
            instance_destroy(obj_chefs_customer_spawner);
99
            with (obj_chefs_susie)
100
            {
101
                with (instance_create(x, y, obj_chefs_vfx))
102
                {
103
                    sprite_index = spr_shadowman_leave;
104
                    image_xscale = 2;
105
                    image_yscale = 2;
106
                    image_speed = 1;
107
                }
108
                instance_destroy();
109
            }
110
            with (obj_chefs_ralsei)
111
            {
112
                with (instance_create(x, y, obj_chefs_vfx))
113
                {
114
                    sprite_index = spr_shadowman_leave;
115
                    image_xscale = -2;
116
                    image_yscale = 2;
117
                    image_speed = 1;
118
                    image_index = 1;
119
                }
120
                instance_destroy();
121
            }
122
            with (instance_create(300, 420, obj_chefs_evilguest))
123
            {
124
                image_xscale = 2;
125
                image_yscale = 2;
126
                ya = 60;
127
                movetype = 1;
128
            }
129
            with (instance_create(340, 440, obj_chefs_evilguest))
130
            {
131
                image_xscale = 2;
132
                image_yscale = 2;
133
                movetype = 1;
134
                yf = 0.2;
135
                xf *= -1.1;
136
                depth -= 10;
137
                sprite_index = spr_shadowman_run3;
138
            }
139
            obj_chefs_game.timer = 12;
140
            obj_chefs_game.timer_max = 12;
141
            with (obj_chefs_kris)
142
                audio_stop_sound(snd_egg);
143
            break;
144
        case 4:
145
            instance_destroy(obj_chefs_customer_spawner);
146
            with (obj_chefs_spawner)
147
            {
148
                mode = 0;
149
alarm[0]
150
            }
151
            with (instance_create(300, 420, obj_chefs_customer))
152
            {
153
                tenna = true;
154
                image_speed = 0;
155
                movespeed = 10;
156
                moves = 20;
157
                foods_needed = 6;
158
                special = 1;
159
                movetype = 1;
160
                var _firewhip = instance_create(x, y, obj_chefs_firewhip);
161
                _firewhip.fixate = id;
162
            }
163
            obj_chefs_game.timer = 16;
164
            obj_chefs_game.timer_max = 16;
165
            with (obj_chefs_kris)
166
                x -= 80;
167
            break;
168
        case 5:
169
            instance_destroy(obj_chefs_customer_spawner);
170
            instance_create(0, -16, obj_chefs_spawner);
171
            instance_create(0, -16, obj_chefs_spawner);
172
            with (obj_chefs_spawner)
173
            {
174
                mode = 0;
175
alarm[0]
176
            }
177
            with (instance_create(300, 420, obj_chefs_customer))
178
            {
179
                sprite_index = spr_tenna_grasp_chef;
180
                image_speed = 0;
181
                movespeed = 10;
182
                moves = 20;
183
                foods_needed = 10;
184
                special = 1;
185
                movetype = 1;
186
                var _firewhip = instance_create(x, y, obj_chefs_firewhip);
187
                _firewhip.fixate = id;
188
            }
189
            obj_chefs_game.timer = 16;
190
            obj_chefs_game.timer_max = 16;
191
            with (obj_chefs_kris)
192
                x -= 80;
193
            break;
194
        case 6:
195
            var i = 1;
196
            with (obj_chefs_spawner)
197
            {
198
                mode = 1;
199
                side = i;
200
                freq = 90;
201
alarm[0]
202
                visible = false;
203
                i = -1;
204
            }
205
            instance_destroy(obj_chefs_customer_spawner);
206
            with (obj_chefs_susie)
207
                instance_destroy();
208
            with (obj_chefs_ralsei)
209
                instance_destroy();
210
            tinytenna1 = instance_create(90, 140, obj_tenna_chef_marker1);
211
            tinytenna2 = instance_create(500, 140, obj_tenna_chef_marker1);
212
            tinytenna2.type = 1;
213
            with (instance_create(320, 40, obj_chefs_fireguest))
214
            {
215
                depth++;
216
                visible = false;
217
            }
218
            obj_chefs_game.timer = 10;
219
            obj_chefs_game.timer_max = 10;
220
            with (obj_chefs_kris)
221
            {
222
                mask_index = spr_kris_chef_walk;
223
                audio_stop_sound(snd_egg);
224
            }
225
            break;
226
    }
227
}
228
229
function scr_chefs_end()
230
{
231
    instance_destroy(obj_chefs_100pts);
232
    instance_destroy(obj_chefs_coinvfx);
233
    instance_destroy(obj_chefs_customer);
234
    instance_destroy(obj_chefs_customer_spawner);
235
    instance_destroy(obj_chefs_evilguest);
236
    instance_destroy(obj_chefs_fire);
237
    instance_destroy(obj_chefs_fireguest);
238
    instance_destroy(obj_chefs_food);
239
    instance_destroy(obj_chefs_foodnotice);
240
    instance_destroy(obj_chefs_game);
241
    instance_destroy(obj_chefs_init);
242
    instance_destroy(obj_chefs_jumpcatchtxt);
243
    instance_destroy(obj_chefs_kris);
244
    instance_destroy(obj_chefs_ralsei);
245
    instance_destroy(obj_chefs_scoretxt);
246
    instance_destroy(obj_chefs_spawner);
247
    instance_destroy(obj_chefs_stackbox);
248
    instance_destroy(obj_chefs_susie);
249
    instance_destroy(obj_chefs_toggles);
250
    instance_destroy(obj_chefs_vfx);
251
}