Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_insideclosetcutscene_Step_0

(view raw script w/o annotations or w/e)
1
if (papeshake == 1)
2
{
3
    with (obj_fallpaper)
4
    {
5
        if (vspeed == 0)
6
        {
7
            x = xstart + random(1);
8
            y = ystart + 10 + random(1);
9
        }
10
    }
11
}
12
if (papefall == 1)
13
{
14
    papetimer += 1;
15
    if (papetimer >= 3)
16
    {
17
        if (papei < papeno)
18
        {
19
            snd_stop(snd_paper_rise);
20
            snd_play(snd_paper_rise);
21
            with (pape[papei])
22
            {
23
                sprite_index = spr_paperfly;
24
                vspeed = 1;
25
                image_speed = 0.5;
26
                gravity = 0.5;
27
            }
28
            papetimer = 0;
29
            papei += 1;
30
        }
31
    }
32
}
33
if (global.interact == 0 && obj_mainchara.x <= 70)
34
{
35
    obj_mainchara.x = 71;
36
    global.fe = 7;
37
    global.fc = 1;
38
    global.typer = 10;
39
    dex = 1;
40
    global.interact = 1;
41
    global.msg[0] = 
* Kris,Delay 11 if you leave me here,Delay 11 I'll..Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_45_0")
;
42
    instance_create(0, 0, obj_dialoguer);
43
}
44
if (dex == 1 && instance_exists(obj_dialoguer) == false)
45
{
46
    global.facing = 1;
47
    global.interact = 0;
48
    dex = 0;
49
}
50
if (con == 1.5)
51
{
52
    global.interact = 1;
53
    global.fe = 0;
54
    global.fc = 1;
55
    global.typer = 10;
56
    global.msg[0] = 
* See?Delay 11
* Why are you so scared?Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_62_0")
;
57
    global.msg[1] = 
* There's nothing in here but old papers.Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_63_0")
;
58
    global.msg[2] = 
* Let's try to find a lightswitch.Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_64_0")
;
59
    con = 2;
60
    instance_create(0, 0, obj_dialoguer);
61
}
62
if (con == 2 && instance_exists(obj_dialoguer) == false)
63
{
64
    image_speed = 0.2;
65
    global.interact = 0;
66
    hspeed = 3;
67
    con = 3;
68
}
69
if (con == 3)
70
{
71
    if (obj_mainchara.px >= 3)
72
        hspeed = obj_mainchara.px;
73
    else
74
        hspeed = 3;
75
    if (x >= 310)
76
    {
77
        
scr_halt
scr_halt

function
scr_halt()
{ image_index = 0; image_speed = 0; speed = 0; }
();
78
        sprite_index = spr_susieu;
79
        con = 4;
80
    }
81
}
82
if (con == 4 && obj_mainchara.x >= 270 && global.interact == 0)
83
{
84
    sprite_index = spr_susiel;
85
    global.interact = 1;
86
    global.fe = 0;
87
    global.fc = 1;
88
    global.typer = 10;
89
    global.msg[0] = 
* That's weird...Delay 11
* I can't find a switch.Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_97_0")
;
90
    global.msg[1] = 
* Guess it's further in...Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_98_0")
;
91
    con = 5;
92
    instance_create(0, 0, obj_dialoguer);
93
}
94
if (con == 5 && instance_exists(obj_dialoguer) == false)
95
{
96
    sprite_index = spr_susier;
97
    image_speed = 0.2;
98
    global.interact = 0;
99
    hspeed = 3;
100
    con = 6;
101
}
102
if (con == 6)
103
{
104
    if (obj_mainchara.px >= 3)
105
        hspeed = obj_mainchara.px;
106
    else
107
        hspeed = 3;
108
    if (x >= 490)
109
    {
110
        
scr_halt
scr_halt

function
scr_halt()
{ image_index = 0; image_speed = 0; speed = 0; }
();
111
        sprite_index = spr_susier;
112
        con = 7;
113
    }
114
}
115
if (con == 7 && obj_mainchara.x >= 450 && global.interact == 0)
116
{
117
    sprite_index = spr_susiel;
118
    global.interact = 1;
119
    global.fe = 0;
120
    global.fc = 1;
121
    global.typer = 10;
122
    global.msg[0] = 
* ...Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_134_0")
;
123
    global.msg[1] = 
* Uhhh...Delay 11 kind of big for a closet,Delay 11 huh...?Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_135_0")
;
124
    global.msg[2] = 
* You'd think we'd have reached the end by now...Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_136_0")
;
125
    con = 8;
126
    instance_create(0, 0, obj_dialoguer);
127
}
128
if (con == 8 && instance_exists(obj_dialoguer) == false)
129
{
130
    sprite_index = spr_susier;
131
    image_speed = 0.2;
132
    global.interact = 0;
133
    hspeed = 3;
134
    con = 9;
135
}
136
if (con == 9)
137
{
138
    if (obj_mainchara.px >= 3)
139
        hspeed = obj_mainchara.px;
140
    else
141
        hspeed = 3;
142
    if (x >= 670)
143
    {
144
        
scr_halt
scr_halt

function
scr_halt()
{ image_index = 0; image_speed = 0; speed = 0; }
();
145
        sprite_index = spr_susier;
146
        con = 10;
147
    }
148
}
149
if (con == 10 && obj_mainchara.x >= 630 && global.interact == 0)
150
{
151
    sprite_index = spr_susiel;
152
    global.interact = 1;
153
    global.fe = 0;
154
    global.fc = 1;
155
    global.typer = 10;
156
    global.msg[0] = 
* ...Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_180_0")
;
157
    global.msg[1] = 
* Hey,Delay 11 Kris.Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_181_0")
;
158
    global.msg[2] = 
Face 1* I think this closet's,Delay 11 uh...Delay 11
* Broken.Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_182_0")
;
159
    global.msg[3] = 
Face 2* There aren't any walls.Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_183_0")
;
160
    global.msg[4] = 
Face 0* ...Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_184_0")
;
161
    global.msg[5] = 
Face 1* Well,Delay 11 we've worked hard enough.Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_185_0")
;
162
    global.msg[6] = 
Face 2* If Alphys wants chalk so bad,Delay 11 she can get it herself.Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_186_0")
;
163
    global.msg[7] = 
* Let's split.Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_187_0")
;
164
    con = 15;
165
    instance_create(0, 0, obj_dialoguer);
166
}
167
if (con == 15 && instance_exists(obj_dialoguer) == false)
168
{
169
    with (obj_mainchara)
170
    {
171
        x -= 140;
172
        fun = 1;
173
        sprite_index = spr_krisl;
174
        image_speed = 0.2;
175
        hspeed = -3;
176
    }
177
    x -= 140;
178
    hspeed = -3;
179
    sprite_index = spr_susiel;
180
    image_speed = 0.2;
181
    con = 16;
182
    alarm[4]
 = 120;
gml_Object_obj_insideclosetcutscene_Alarm_4.gml

con += 1;
183
}
184
if (con == 17)
185
{
186
    
scr_windowcaption
scr_windowcaption

function
scr_windowcaption(arg0)
{ if (global.tempflag[10] == 1) window_set_caption(
DELTARUNE
scr_84_get_lang_string("scr_windowcaption_slash_scr_windowcaption_gml_1_0")
);
else window_set_caption(arg0); }
(" ");
187
    sprite_index = spr_susiel_plain;
188
    
scr_halt
scr_halt

function
scr_halt()
{ image_index = 0; image_speed = 0; speed = 0; }
();
189
    with (obj_mainchara)
190
        
scr_halt
scr_halt

function
scr_halt()
{ image_index = 0; image_speed = 0; speed = 0; }
();
191
    tile_layer_hide(1000000);
192
    snd_free_all();
193
    with (obj_fallpaper)
194
        image_blend = c_gray;
195
    snd_play(snd_locker);
196
    con = 18;
197
    alarm[4]
 = 60;
gml_Object_obj_insideclosetcutscene_Alarm_4.gml

con += 1;
198
}
199
if (con == 19)
200
{
201
    global.fe = 0;
202
    global.msg[0] = 
Face 9* Wh-what the...!?Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_237_0")
;
203
    instance_create(0, 0, obj_dialoguer);
204
    con = 51;
205
}
206
if (con == 51 && d_ex() == false)
207
{
208
    remxx = x;
209
    hspeed = -5;
210
    image_speed = 0.5;
211
    con = 52;
212
    alarm[4]
 = 20;
gml_Object_obj_insideclosetcutscene_Alarm_4.gml

con += 1;
213
}
214
if (con == 53)
215
{
216
    
scr_halt
scr_halt

function
scr_halt()
{ image_index = 0; image_speed = 0; speed = 0; }
();
217
    remsx = x;
218
    remsy = y;
219
    with (obj_mainchara)
220
    {
221
        remsx = x;
222
        remsy = y;
223
    }
224
    global.fe = 9;
225
    global.msg[0] = 
Face 9* Hey,Delay 11 this isn't funny!
* LET US OUT!Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_266_0")
;
226
    global.msg[1] = 
* LET US...Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_267_0")
;
227
    instance_create(0, 0, obj_dialoguer);
228
    con = 54;
229
}
230
if (con == 54 && d_ex() == false)
231
{
232
    pape_sfx = snd_loop(snd_paper_rumble);
233
    papeshake = 1;
234
    con = 55;
235
    alarm[4]
 = 30;
gml_Object_obj_insideclosetcutscene_Alarm_4.gml

con += 1;
236
}
237
if (con == 56)
238
{
239
    global.fe = 0;
240
    global.msg[0] = 
* ...?Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_284_0")
;
241
    instance_create(0, 0, obj_dialoguer);
242
    con = 57;
243
}
244
if (con == 57 && d_ex() == false)
245
{
246
    image_speed = 0.2;
247
    alarm[4]
 = 30;
gml_Object_obj_insideclosetcutscene_Alarm_4.gml

con += 1;
248
    con = 58;
249
}
250
if (con == 58)
251
    x += 1;
252
if (con == 59)
253
{
254
    
scr_halt
scr_halt

function
scr_halt()
{ image_index = 0; image_speed = 0; speed = 0; }
();
255
    con = 60;
256
    alarm[4]
 = 30;
gml_Object_obj_insideclosetcutscene_Alarm_4.gml

con += 1;
257
}
258
if (con == 61)
259
{
260
    global.msg[0] = 
Face 0* ...?Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_312_0")
;
261
    global.msg[0] = 
Face 9* The floor,Delay 11 it's...!Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_insideclosetcutscene_slash_Step_0_gml_313_0")
;
262
    instance_create(0, 0, obj_dialoguer);
263
    con = 62;
264
}
265
if (con == 62 && d_ex() == 0)
266
{
267
    snd_stop(pape_sfx);
268
    papefall = 1;
269
    con = 69;
270
    with (obj_mainchara)
271
    {
272
        hspeed = 0.8;
273
        image_speed = 0.1;
274
        cutscene = 1;
275
    }
276
    hspeed = 0.8;
277
    image_speed = 0.1;
278
    alarm[4]
 = 80;
gml_Object_obj_insideclosetcutscene_Alarm_4.gml

con += 1;
279
}
280
if (instance_exists(obj_dialoguer) == false && con == 70)
281
{
282
    hspeed = 0;
283
    __view_set(e__VW.Object, 0, -4);
284
    with (obj_mainchara)
285
        visible = 0;
286
    k = 
scr_marker
scr_marker

function
scr_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; } return thismarker; }
(obj_mainchara.x, obj_mainchara.y, spr_kris_fall);
287
    with (k)
288
    {
289
        vspeed = 1;
290
        gravity = 0.5;
291
    }
292
    image_speed = 0;
293
    image_index = 0;
294
    vspeed = 1;
295
    gravity = 0.5;
296
    sprite_index = spr_susie_fall;
297
    snd_play(snd_sussurprise);
298
    con = 21;
299
    alarm[4]
 = 50;
gml_Object_obj_insideclosetcutscene_Alarm_4.gml

con += 1;
300
}
301
if (con == 22)
302
{
303
    snd_play(snd_closet_fall);
304
    rate = 5;
305
    rate_alpha = 1.8;
306
    bgdraw = 1;
307
    con = 23;
308
    alarm[4]
 = 150;
gml_Object_obj_insideclosetcutscene_Alarm_4.gml

con += 1;
309
}
310
if (con == 24)
311
{
312
    snd_play(snd_closet_impact);
313
    con = 25;
314
    alarm[4]
 = 80;
gml_Object_obj_insideclosetcutscene_Alarm_4.gml

con += 1;
315
}
316
if (con == 26)
317
{
318
    global.currentsong[0] = snd_init("ocean.ogg");
319
    global.currentsong[1] = mus_loop_ext(global.currentsong[0], 1, 0.9);
320
    snd_volume(global.currentsong[1], 0.2, 0);
321
    snd_volume(global.currentsong[1], 1, 200);
322
    con = 29;
323
    alarm[4]
 = 260;
gml_Object_obj_insideclosetcutscene_Alarm_4.gml

con += 1;
324
}
325
if (con == 31)
326
{
327
    global.plot = 10;
328
    
scr_become_dark
scr_become_dark

function
scr_become_dark()
{ global.darkzone = 1; }
();
329
    room_goto(room_dark1_ch1 Cavern - First dark world room);
330
}
331
if (con == 30)
332
{
333
    snd_free(global.currentsong[0]);
334
    con = 31;
335
}
336
337
enum e__VW
338
{
339
    XView,
340
    YView,
341
    WView,
342
    HView,
343
    Angle,
344
    HBorder,
345
    VBorder,
346
    HSpeed,
347
    VSpeed,
348
    Object,
349
    Visible,
350
    XPort,
351
    YPort,
352
    WPort,
353
    HPort,
354
    Camera,
355
    SurfaceID
356
}