Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_dw_teevie_watercooler_Create_0

(view raw script w/o annotations or w/e)
1
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
2
    depth = -10;
3
timer = 0;
4
con = 0;
5
curtain = instance_create(236, 92, obj_trigger_interact);
6
curtain.sprite_index = spr_dw_changing_room_curtain_transparent;
7
curtain.visible = true;
8
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
(curtain);
9
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)); } }
(curtain);
10
curcon = 0;
11
curtainrod = 
scr_marker_ext
scr_marker_ext

function
scr_marker_ext(arg0, arg1, arg2, arg3 = 1, arg4 = 1, arg5 = 0, arg6 = 0, arg7 = 16777215, arg8 = depth, arg9 = false, arg10 = -1, arg11 = 1)
{ var thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { depth = arg8; sprite_index = arg2; image_speed = arg5; image_xscale = arg3; image_yscale = arg4; image_index = arg6; image_blend = arg7; image_alpha = arg11; if (arg9)
scr_depth();
} if (arg10 > 0)
scr_doom(thismarker, arg10);
return thismarker; }
(240, 100, spr_pxwhite, 12, 4, undefined, undefined, #C0A395, 97440);
12
curtainblock = instance_create(240, 206, obj_solidblocksized);
13
with (curtainblock)
14
{
15
    image_xscale = 5;
16
    image_yscale = 0.5;
17
}
18
watercooler = instance_create(320, 248, obj_trigger_interact);
19
watercooler.sprite_index = spr_watercooler;
20
watercooler.visible = true;
21
watercooler.extflag = "watercooler";
22
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
(watercooler);
23
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)); } }
(watercooler);
24
if (global.flag[1143 cooler_avoid_num] < 50)
25
{
26
    global.flag[1143 cooler_avoid_num]++;
27
    if (global.flag[1143 cooler_avoid_num] > 5)
28
        global.flag[1143 cooler_avoid_num] = 5;
29
    if (global.flag[1143 cooler_avoid_num] == 2)
30
        watercooler.y += 10;
31
    if (global.flag[1143 cooler_avoid_num] == 3)
32
        watercooler.y += 30;
33
    if (global.flag[1143 cooler_avoid_num] == 4)
34
        watercooler.y += 60;
35
    if (global.flag[1143 cooler_avoid_num] == 5)
36
    {
37
        watercooler.x = 254;
38
        watercooler.y = 346;
39
        
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)); } }
(watercooler);
40
        watercooler2 = instance_create(292, 316, obj_trigger_interact);
41
        watercooler2.sprite_index = spr_watercooler;
42
        watercooler2.visible = true;
43
        watercooler2.extflag = "watercooler";
44
        
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
(watercooler2);
45
        
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)); } }
(watercooler2);
46
        watercooler2 = instance_create(348, 316, obj_trigger_interact);
47
        watercooler2.sprite_index = spr_watercooler;
48
        watercooler2.visible = true;
49
        watercooler2.extflag = "watercooler";
50
        
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
(watercooler2);
51
        
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)); } }
(watercooler2);
52
        watercooler2 = instance_create(388, 346, obj_trigger_interact);
53
        watercooler2.sprite_index = spr_watercooler;
54
        watercooler2.visible = true;
55
        watercooler2.extflag = "watercooler";
56
        
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
(watercooler2);
57
        
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)); } }
(watercooler2);
58
    }
59
}
60
des = 0;
61
watercon = 0;
62
watertimer = 0;
63
watertrig = 0;
64
fakespikes = instance_create(160, 236, obj_trigger_interact);
65
fakespikes.sprite_index = spr_dw_teevie_watercooler_fakespikes;
66
fakespikes.visible = true;
67
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
(fakespikes);
68
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)); } }
(fakespikes);
69
spikecon = 0;
70
treasure = instance_create(80, 280, obj_trigger_interact);
71
treasure.sprite_index = spr_treasurebox;
72
treasure.visible = true;
73
treasure.issolid = true;
74
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
(treasure);
75
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)); } }
(treasure);
76
trcon = 0;
77
trtimer = 0;
78
watermarker = 0;
79
close = false;
80
itemid = 5;
81
itemtype = "item";
82
cleanup = 0;
83
encounterflag = 592;
84
if (global.flag[1143 cooler_avoid_num] == 50)
85
{
86
    watercooler.x = 9999;
87
    treasure2 = instance_create(treasure.x, treasure.y, obj_trigger_interact);
88
    treasure2.sprite_index = spr_treasurebox;
89
    treasure2.visible = true;
90
    treasure2.issolid = true;
91
    
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
(treasure2);
92
    
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)); } }
(treasure2);
93
    trcon2 = 0;
94
    trtimer2 = 0;
95
    watermarker = 0;
96
    treasure.x = -9999;
97
    watercon = 999;
98
    trcon = 3;
99
    if (global.flag[1145] == 2)
100
        treasure2.image_index = 1;
101
}