Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_npc_castle_cafe_Create_0

(view raw script w/o annotations or w/e)
1
if (global.chapter < 4)
2
{
3
    var jukebox = 
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; }
(44, 82, bg_dw_castle_cafe_juke);
4
    with (jukebox)
5
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
6
    var table_a = 
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; }
(42, 230, bg_dw_castle_cafe_table);
7
    with (table_a)
8
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
9
    var table_b = 
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; }
(260, 230, bg_dw_castle_cafe_table);
10
    with (table_b)
11
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
12
    var table_c = 
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; }
(140, 325, bg_dw_castle_cafe_table);
13
    with (table_c)
14
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
15
    var table_collider_a = instance_create(table_a.x + 8, table_a.y + 10, obj_soliddark);
16
    table_collider_a.image_xscale = 1.9;
17
    table_collider_a.image_yscale = 1.3;
18
    var table_collider_b = instance_create(table_b.x + 8, table_b.y + 10, obj_soliddark);
19
    table_collider_b.image_xscale = 1.9;
20
    table_collider_b.image_yscale = 1.3;
21
    var table_collider_c = instance_create(table_c.x + 8, table_c.y + 10, obj_soliddark);
22
    table_collider_c.image_xscale = 1.9;
23
    table_collider_c.image_yscale = 1.3;
24
    var counter = 
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; }
(365, 110, bg_dw_castle_cafe_counter);
25
    counter.depth = 98000;
26
    tm_con = -1;
27
    t_con = -1;
28
    if (global.chapter == 1)
29
    {
30
        var topchef = instance_create(395, 70, obj_npc_room);
31
        topchef.sprite_index = spr_topchef;
32
    }
33
    if (global.chapter >= 2)
34
    {
35
        if (global.chapter == 2 && global.plot < 200)
36
        {
37
            var topchef = instance_create(405, 70, obj_npc_room);
38
            topchef.sprite_index = spr_topchef;
39
        }
40
        else
41
        {
42
            var swatchlingA = instance_create(418, 62, obj_npc_room);
43
            swatchlingA.sprite_index = spr_npc_swatchling_cafe;
44
            with (swatchlingA)
45
                
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
46
            if (global.flag[636 recruit_butler] == 1)
47
            {
48
                var swatchlingB = instance_create(517, 187, obj_npc_room);
49
                swatchlingB.sprite_index = spr_npc_swatchling_down;
50
                with (swatchlingB)
51
                    
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
52
            }
53
            if (global.flag[642 recruit_task_manager] == 1 && global.flag[632 recruit_tasque] == 1)
54
            {
55
                var tm = instance_create(237, 23, obj_npc_room);
56
                tm.sprite_index = spr_npc_tasquemanager;
57
                tm.image_xscale = -2;
58
            }
59
            if (global.flag[632 recruit_tasque] == 1)
60
            {
61
                var tasqueA = instance_create(255, 63, obj_npc_room);
62
                tasqueA.sprite_index = spr_tasque_idle;
63
            }
64
        }
65
    }
66
}
67
else
68
{
69
    kk_timer = 0;
70
    kk_flip = false;
71
    tm_note = false;
72
    tm_timer = 0;
73
    sweet_note = false;
74
    sweet_timer = 0;
75
    for (var i = 0; i < 6; i++)
76
    {
77
        var _light = 
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; }
(178 + (i * 76), 10, spr_dw_castle_cafe_light);
78
        with (_light)
79
        {
80
            image_speed = 0.2;
81
            
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
82
        }
83
        var _beam = 
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; }
(178 + (i * 76), 10, spr_dw_castle_cafe_light_beam);
84
        with (_beam)
85
        {
86
            image_speed = 0.2;
87
            image_alpha = 0.5;
88
        }
89
        _beam.depth = _light.depth + 1;
90
    }
91
    var _curtains = 
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; }
(146, 0, spr_dw_castle_cafe_curtain);
92
    _curtains.depth = 98590;
93
    if (global.flag[642 recruit_task_manager] == 1)
94
    {
95
        tm_note = true;
96
        tm_marker = 
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; }
(190, 28, spr_npc_tm_sing);
97
        with (tm_marker)
98
        {
99
            
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
100
            image_speed = 0.2;
101
        }
102
    }
103
    if (scr_recruited_all_previous())
104
    {
105
        sweet_note = true;
106
        kk_flip = true;
107
        kk_marker = 
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; }
(320, 10, spr_npc_kk_highhat);
108
        with (kk_marker)
109
        {
110
            
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
111
            image_speed = 0;
112
        }
113
        var drum_marker = 
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; }
(310, 50, spr_susie_drum_isolate);
114
        with (drum_marker)
115
            
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
116
        sweet_marker = 
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; }
(460, 80, spr_npc_sweet_sing);
117
        with (sweet_marker)
118
        {
119
            
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
120
            image_speed = 0.1;
121
        }
122
        var saxman_marker = 
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; }
(525, 40, spr_shadowman_sax_a);
123
        with (saxman_marker)
124
        {
125
            
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
126
            image_speed = 0.2;
127
        }
128
    }
129
    var swatchlingA = instance_create(715, 60, obj_npc_room);
130
    swatchlingA.sprite_index = spr_npc_swatchling_cafe;
131
    with (swatchlingA)
132
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
133
    if (global.flag[642 recruit_task_manager] == 1 && global.flag[632 recruit_tasque] == 1 && global.flag[654 recruit_shadowguy] == 1)
134
    {
135
        swatchlingA.sprite_index = spr_npc_swatchling_cafe_neko;
136
        var shadowguy_dancerA = instance_create(226, 270, obj_npc_room_animated);
137
        with (shadowguy_dancerA)
138
        {
139
            extflag = "shadowguy_dance";
140
            sprite_index = spr_npc_shadowguy_cat_dance;
141
            
scr_flip
scr_flip

function
scr_flip(arg0)
{ if (arg0 == "h" || arg0 == "x") { x += ((sprite_get_width(sprite_index) - (sprite_get_xoffset(sprite_index) * 2)) * image_xscale); image_xscale = -image_xscale; } else { y += ((sprite_get_height(sprite_index) - (sprite_get_yoffset(sprite_index) * 2)) * image_yscale); image_yscale = -image_yscale; } }
("x");
142
            x = 226;
143
            
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
144
        }
145
        var tasque_dancerA = instance_create(263, 150, obj_npc_room_animated);
146
        with (tasque_dancerA)
147
        {
148
            extflag = "tasque_dance";
149
            sprite_index = spr_npc_tasque_dance;
150
            
scr_flip
scr_flip

function
scr_flip(arg0)
{ if (arg0 == "h" || arg0 == "x") { x += ((sprite_get_width(sprite_index) - (sprite_get_xoffset(sprite_index) * 2)) * image_xscale); image_xscale = -image_xscale; } else { y += ((sprite_get_height(sprite_index) - (sprite_get_yoffset(sprite_index) * 2)) * image_yscale); image_yscale = -image_yscale; } }
("x");
151
            x = 263;
152
            
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
153
        }
154
        var tasque_dancerB = instance_create(263, 150, obj_npc_room_animated);
155
        with (tasque_dancerB)
156
        {
157
            extflag = "tasque_dance";
158
            sprite_index = spr_npc_tasque_dance;
159
            x = 263;
160
            
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
161
        }
162
        var tasque_dancerC = instance_create(589, 150, obj_npc_room_animated);
163
        with (tasque_dancerC)
164
        {
165
            extflag = "tasque_dance";
166
            sprite_index = spr_npc_tasque_dance;
167
            
scr_flip
scr_flip

function
scr_flip(arg0)
{ if (arg0 == "h" || arg0 == "x") { x += ((sprite_get_width(sprite_index) - (sprite_get_xoffset(sprite_index) * 2)) * image_xscale); image_xscale = -image_xscale; } else { y += ((sprite_get_height(sprite_index) - (sprite_get_yoffset(sprite_index) * 2)) * image_yscale); image_yscale = -image_yscale; } }
("x");
168
            x = 589;
169
            
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
170
        }
171
        var shadowguy_dancerB = instance_create(580, 148, obj_npc_room_animated);
172
        with (shadowguy_dancerB)
173
        {
174
            extflag = "shadowguy_dance";
175
            sprite_index = spr_npc_shadowguy_cat_dance;
176
            
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
177
        }
178
    }
179
}