Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b3bs_console_Create_0

(view raw script w/o annotations or w/e)
1
con = 0;
2
timer = 0;
3
buffer = 0;
4
canceltimer = 0;
5
depth = 5;
6
image_speed = 0;
7
player = 0;
8
characterIndex = 0;
9
cantuse = false;
10
skipcrt = false;
11
camera = false;
12
nocamera = false;
13
sword = false;
14
controlxpos = (x + 18) - 2;
15
controlypos = (y + 30) - 38;
16
camx = -1;
17
camy = 0;
18
camcon = 0;
19
camxoverride = 0;
20
camyoverride = 0;
21
init = 0;
22
kris = 0;
23
susie = 0;
24
ralsei = 0;
25
instructionLerp = 0;
26
engaged = 0;
27
canceltime = 15;
28
playx = 420;
29
playy = 190;
30
endplay = false;
31
gscreenw = 320;
32
gscreenh = 240;
33
gscreenx = 32;
34
gscreeny = 32;
35
canswitch = true;
36
startplayer = "kris";
37
dontdelete = false;
38
usecount = 0;
39
cutscene_master = 0;
40
image_alpha = 0.1;
41
depth = 500;
42
nostartchange = false;
43
skipcamreset = false;
44
playerid[0] = "kris";
45
array_push(playerid, "susie");
46
array_push(playerid, "ralsei");
47
for (var i = 0; i < global.flag[1099 lancer_control_num]; i++)
48
    array_push(playerid, "lancer");
49
if (room == room_dw_puzzlecloset_1)
50
{
51
    if (global.flag[1133 parent_lock_1_start] == 0)
52
    {
53
        tv1 = instance_create(384, 96, obj_puzzlecloset_tvturnon);
54
        tv2 = instance_create(560, 96, obj_puzzlecloset_tvturnon);
55
        tv3 = instance_create(736, 96, obj_puzzlecloset_tvturnon);
56
    }
57
    cantuse = true;
58
    if (global.flag[1090 parent_lock_1_scene] == 1)
59
        cantuse = false;
60
    camx = 303;
61
    camy = 0;
62
    if (global.flag[1055 sword_route_progress] > 0)
63
    {
64
        array_resize(playerid, 0);
65
        playerid[0] = "kris";
66
        startplayer = "kris";
67
        sword = true;
68
    }
69
    else
70
    {
71
        array_resize(playerid, 0);
72
        playerid[0] = "susie";
73
        startplayer = "susie";
74
    }
75
    gscreenw = 384;
76
    gscreenh = 160;
77
    gscreenx = 768;
78
    gscreeny = 192;
79
    playx = 1472;
80
    playy = 272;
81
    canswitch = false;
82
    depth = 99799;
83
    image_alpha = 1;
84
}
85
if (room == room_dw_puzzlecloset_2)
86
{
87
    if (global.flag[1134 parent_lock_2_start] == 0)
88
    {
89
        for (var i = 0; i < 3; i++)
90
        {
91
            var xloc = 448;
92
            var yloc = 32;
93
            var xspace = 192;
94
            var yspace = 160;
95
            tv[i] = instance_create(xloc + (i * xspace), yloc + (yspace * 0), obj_puzzlecloset_tvturnon);
96
            tv[i].width = 160;
97
            tv[i].height = 128;
98
            tv[i + 3] = instance_create(xloc + (i * xspace), yloc + (yspace * 1), obj_puzzlecloset_tvturnon);
99
            tv[i + 3].width = 160;
100
            tv[i + 3].height = 128;
101
        }
102
    }
103
    camx = 398;
104
    if (global.flag[1055 sword_route_progress] > 0)
105
    {
106
        array_resize(playerid, 0);
107
        playerid[0] = "kris";
108
        startplayer = "kris";
109
        sword = true;
110
    }
111
    else
112
    {
113
        array_resize(playerid, 0);
114
        playerid[0] = "susie";
115
        startplayer = "susie";
116
    }
117
    gscreenw = 384;
118
    gscreenh = 160;
119
    gscreenx = 768;
120
    gscreeny = 192;
121
    playx = 3072;
122
    playy = 256;
123
    canswitch = false;
124
    depth = 99799;
125
    image_alpha = 1;
126
}
127
if (room == room_dw_puzzlecloset_3)
128
{
129
    if (global.flag[1150 parent_lock_3] == 0)
130
    {
131
        tv1 = instance_create(524, 32, obj_puzzlecloset_tvturnon);
132
        tv1.width = 384;
133
        tv1.height = 256;
134
    }
135
    skipcrt = true;
136
    camx = 396;
137
    camy = 0;
138
    array_resize(playerid, 0);
139
    playerid[0] = "kris";
140
    playerid[1] = "susie";
141
    playerid[2] = "ralsei";
142
    startplayer = "kris";
143
    playx = 2944;
144
    playy = 736;
145
    canswitch = true;
146
    if (global.flag[1150 parent_lock_3] < 4)
147
        nocamera = true;
148
    if (global.flag[1150 parent_lock_3] >= 1.5)
149
    {
150
        var roomstartx = 2688;
151
        var roomstarty = 608;
152
        playx = 2752;
153
        playy = 704;
154
        with (obj_board_camera)
155
        {
156
            warpx = 2304;
157
            warpy = 1376;
158
            var moveX = roomstartx - warpx - originX;
159
            var moveY = roomstarty - warpy - originY;
160
            with (obj_board_parent)
161
                setxy(x + moveX, y + moveY);
162
            layer_x(tileLayer, layer_get_x(tileLayer) + moveX);
163
            layer_y(tileLayer, layer_get_y(tileLayer) + moveY);
164
            if (layer_exists(assetLayer))
165
            {
166
                layer_x(assetLayer, layer_get_x(assetLayer) + moveX);
167
                layer_y(assetLayer, layer_get_y(assetLayer) + moveY);
168
            }
169
            if (layer_exists(tileLayer2))
170
            {
171
                layer_x(tileLayer2, layer_get_x(tileLayer2) + moveX);
172
                layer_y(tileLayer2, layer_get_y(tileLayer2) + moveY);
173
            }
174
        }
175
    }
176
    depth = 99799;
177
    image_alpha = 1;
178
}
179
if (room == room_dw_b3bs_rouxls_lanina)
180
{
181
    gscreenw = 384;
182
    gscreenh = 160;
183
    gscreenx = 128;
184
    gscreeny = 32;
185
    playx = 356;
186
    playy = 104;
187
    if (!
scr_keyitemcheck
scr_keyitemcheck

function
scr_keyitemcheck(arg0)
{ haveit = 0; itemcount = 0; for (i = 0; i < 12; i += 1) { if (global.keyitem[i] == arg0) haveit = 1; if (global.keyitem[i] == arg0) itemcount += 1; } return haveit; }
(16))
188
        cantuse = true;
189
}
190
if (room == room_dw_b3bstest_big)
191
{
192
    playx = 96;
193
    playy = 128;
194
}
195
if (room == room_dw_b3bs_intro)
196
{
197
    playx = 128;
198
    playy = 192;
199
    gscreenw = 512;
200
    gscreenh = 160;
201
    gscreenx = 64;
202
    gscreeny = 96;
203
    image_alpha = 0;
204
    if (global.plot < 200)
205
    {
206
        canswitch = false;
207
        skipcamreset = true;
208
        dontdelete = true;
209
        cantuse = true;
210
        array_resize(playerid, 0);
211
        playerid[0] = "lancer";
212
        startplayer = "lancer";
213
        player = instance_create(playx, playy, obj_mainchara_board);
214
        player.freeroam = true;
215
        player.dontteam = true;
216
        player.canfreemove = true;
217
        player.controlled = 0;
218
        player.name = startplayer;
219
    }
220
    if (global.plot >= 125)
221
        cantuse = false;
222
}
223
if (room == room_dw_b3bs_lancerget)
224
{
225
    playx = -1;
226
    playy = -1;
227
    skipcrt = true;
228
    canswitch = false;
229
    array_resize(playerid, 0);
230
    playerid[0] = "lancer";
231
}
232
if (room == room_dw_b3bs_bibliox)
233
{
234
    
scr_depth
scr_depth

function
scr_depth()
{ if (argument_count > 0) { with (argument0) depth = 100000 - ((y * 10) + (sprite_height * 10)); } else { depth = 100000 - ((y * 10) + (sprite_height * 10)); } }
();
235
    playx = 304;
236
    playy = 176;
237
    gscreenw = 384;
238
    gscreenh = 160;
239
    gscreenx = 128;
240
    gscreeny = 64;
241
    canswitch = false;
242
    skipcamreset = true;
243
    camxoverride = 0;
244
    nocamera = true;
245
}
246
if (room == room_dw_b3bs_cheaterpippins)
247
{
248
    
scr_depth
scr_depth

function
scr_depth()
{ if (argument_count > 0) { with (argument0) depth = 100000 - ((y * 10) + (sprite_height * 10)); } else { depth = 100000 - ((y * 10) + (sprite_height * 10)); } }
();
249
    skipcrt = true;
250
    playx = 384;
251
    playy = 160;
252
    gscreenw = 288;
253
    gscreenh = 160;
254
    gscreenx = 256;
255
    gscreeny = 64;
256
    camx = 80;
257
    camy = 0;
258
    with (instance_create(gscreenx, gscreeny, obj_board_screen))
259
    {
260
        screenwidth = other.gscreenw;
261
        screenheight = other.gscreenh;
262
        depth = 100000;
263
    }
264
}
265
if (room == room_dw_b3bs_idcardpuzzle)
266
{
267
    
scr_depth
scr_depth

function
scr_depth()
{ if (argument_count > 0) { with (argument0) depth = 100000 - ((y * 10) + (sprite_height * 10)); } else { depth = 100000 - ((y * 10) + (sprite_height * 10)); } }
();
268
    playx = 320;
269
    playy = 192;
270
    gscreenw = 448;
271
    gscreenh = 160;
272
    gscreenx = 128;
273
    gscreeny = 64;
274
}
275
if (room == room_dw_b3bs_camerareminder)
276
{
277
    playx = 448;
278
    playy = 128;
279
    gscreenw = 384;
280
    gscreenh = 160;
281
    gscreenx = 128;
282
    gscreeny = 64;
283
    nostartchange = true;
284
}
285
if (room == room_dw_b3bs_sadshadowguys)
286
{
287
    skipcrt = true;
288
    playx = 192;
289
    playy = 224;
290
    gscreenw = 640;
291
    gscreenh = 192;
292
    gscreenx = 160;
293
    gscreeny = 96;
294
    camx = 160;
295
    camy = 0;
296
    with (instance_create(gscreenx, gscreeny, obj_board_screen))
297
    {
298
        screenwidth = other.gscreenw;
299
        screenheight = other.gscreenh;
300
        depth = 100000;
301
    }
302
}
303
if (room == room_dw_b3bs_mysterypuzzle)
304
{
305
    skipcrt = true;
306
    playx = 192;
307
    playy = 224;
308
    gscreenw = 352;
309
    gscreenh = 224;
310
    gscreenx = 128;
311
    gscreeny = 64;
312
    camx = 0;
313
    camy = 0;
314
    with (instance_create(gscreenx, gscreeny, obj_board_screen))
315
    {
316
        screenwidth = other.gscreenw;
317
        screenheight = other.gscreenh;
318
        depth = 100000;
319
    }
320
}
321
if (room == room_dw_b3bs_extrapuzzle)
322
{
323
    
scr_depth
scr_depth

function
scr_depth()
{ if (argument_count > 0) { with (argument0) depth = 100000 - ((y * 10) + (sprite_height * 10)); } else { depth = 100000 - ((y * 10) + (sprite_height * 10)); } }
();
324
    skipcrt = true;
325
    playx = 352;
326
    playy = 224;
327
    gscreenw = 352;
328
    gscreenh = 224;
329
    gscreenx = 224;
330
    gscreeny = 96;
331
    canswitch = false;
332
    camx = 80;
333
    camy = 0;
334
    with (instance_create(gscreenx, gscreeny, obj_board_screen))
335
    {
336
        screenwidth = other.gscreenw;
337
        screenheight = other.gscreenh;
338
        depth = 100000;
339
    }
340
}
341
if (room == room_dw_teevie_shadow_guys)
342
{
343
    skipcrt = true;
344
    playx = 1560;
345
    playy = 224;
346
    gscreenw = 1280;
347
    gscreenh = 160;
348
    gscreenx = 408;
349
    gscreeny = 96;
350
    camera = false;
351
    nocamera = true;
352
    canswitch = false;
353
    camx = 1194;
354
    camy = 0;
355
    with (instance_create(gscreenx, gscreeny, obj_board_screen))
356
    {
357
        screenwidth = other.gscreenw;
358
        screenheight = other.gscreenh;
359
        depth = 100000;
360
    }
361
}
362
if (room == room_dw_teevie_susiebridge)
363
{
364
    skipcrt = true;
365
    skipcrt = true;
366
    playx = 208;
367
    playy = 144;
368
    gscreenw = 384;
369
    gscreenh = 256;
370
    gscreenx = 160;
371
    gscreeny = 64;
372
    camera = false;
373
    nocamera = true;
374
    camx = 16;
375
    camy = 0;
376
    with (instance_create(gscreenx, gscreeny, obj_board_screen))
377
    {
378
        screenwidth = other.gscreenw;
379
        screenheight = other.gscreenh;
380
        depth = 100000;
381
    }
382
}
383
depth = 5;
384
if (room == room_dw_puzzlecloset_1 || room == room_dw_puzzlecloset_2 || room == room_dw_puzzlecloset_3)
385
    sprite_index = spr_ch3_dw_b3bs_console_pc;
386
mymarker = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(x, y, sprite_index);
387
mymarker.depth = 99700;
388
swordinteract = 0;