Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_dw_fcastle_foxhunt_Step_0

related scripts: Create_0Destroy_0Draw_0Draw_76Other_11Other_12Step_0 Step_2

(view raw script w/o annotations or w/e)
1
if (init == 0)
2
{
3
    init = 1;
4
    if (door_is_open)
5
    {
6
        var lay = layer_get_id("FAKE_DOOR");
7
        layer_set_visible(lay, false);
8
        with (obj_solidblocksized_alt)
9
            instance_destroy();
10
    }
11
    
scr_miniface_init_flowers
scr_miniface_init_flowers

function
scr_miniface_init_flowers()
{ var face_list = [4895, 2168, 3300, 2556, 4868, 1691]; for (var i = 0; i < array_length(face_list); i++) global.writerimg[i] = face_list[i]; }
();
12
    with (obj_mainchara)
13
    {
14
        with (instance_place(x, y + 20, obj_terracotta_stationary_overworld))
15
            instance_destroy();
16
    }
17
    if (global.flag[foxflag] == 0)
18
    {
19
        pink_fox = scr_makenpc_fromasset(findsprite(spr_dw_garden_fox_idle, "NPCs"));
20
        pink_fox.image_speed = 0.25;
21
        pink_fox.marker.reflect_jump_y = 26;
22
        with (obj_castlereflect_manager)
23
            add_reflection(other.pink_fox.marker);
24
        
scr_setnpclogic
scr_setnpclogic

function
scr_setnpclogic(arg0, arg1, arg2)
{ if (arg0 == -4) {
scr_debug_print("Failed to add NPC logic");
exit; } if (arg0.marker.sprite_index == spr_debug_40x40) arg0.marker.visible = 0; with (instance_create(0, 0, obj_npc_wrapper)) { if (variable_struct_exists(arg1, "animspeed")) animspeed = arg1.animspeed; if (variable_struct_exists(arg1, "typer")) typer = arg1.typer; if (variable_struct_exists(arg1, "alwaysanimate")) alwaysanimate = arg1.alwaysanimate; npc = arg0; if (!variable_instance_exists(npc.id, "dialogue_side")) npc.dialogue_side = -1; setdialogue = arg2; choices = []; for (var i = 3; i < argument_count; i++) array_push(choices, argument[i]); } }
(pink_fox,
25
        {
26
            alwaysanimate: 1,
27
            animspeed: 0.25
28
        }, function()
29
        {
30
            with (obj_mainchara)
31
                onebuffer = 5;
32
            snd_play(snd_wing);
33
            with (pink_fox)
34
            {
35
                with (instance_create(x - 60, y - 80, obj_animation))
36
                {
37
                    sprite_index = spr_poof;
38
                    image_xscale = 2;
39
                    image_yscale = 2;
40
                    image_speed = 0.5;
41
                }
42
                
scr_script_delayed
scr_script_delayed

function
scr_script_delayed()
{ var __scriptdelay = instance_create(0, 0, obj_script_delayed); __scriptdelay.script = argument[0]; __scriptdelay.alarm[0] = argument[1]; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 2); __i++) __scriptdelay.script_arg[__i] = argument[__i + 2]; __scriptdelay.arg_count = argument_count - 2; return __scriptdelay; } function scr_script_delayed_until() { var __scriptdelay = instance_create(0, 0, obj_script_delayed_function); __scriptdelay.script = argument[0]; __scriptdelay.condition = argument[1]; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 2); __i++) __scriptdelay.script_arg[__i] = argument[__i + 2]; __scriptdelay.arg_count = argument_count - 2; return __scriptdelay; } function delay_function(arg0, arg1) { return
scr_script_delayed(arg0, arg1);
}
(function(arg0)
43
                {
44
                    var t = instance_create(arg0.x, arg0.y + 10, obj_treasure_room);
45
                    with (obj_castlereflect_manager)
46
                    {
47
                        add_reflection(t);
48
                        substitute_sprite(2144, 1489);
49
                        add_sprite_offset(2144, 2, 0);
50
                    }
51
                    instance_destroy(arg0.marker);
52
                    instance_destroy(arg0);
53
                }, 4, self);
54
            }
55
            return -1;
56
        });
57
    }
58
    else
59
    {
60
        var foxloc = findspriteinfo(spr_dw_garden_fox_idle, "NPCs");
61
        with (instance_create(foxloc.x - 24, foxloc.y - 10, obj_treasure_room))
62
        {
63
            with (obj_castlereflect_manager)
64
            {
65
                add_reflection(other.id);
66
                substitute_sprite(2144, 1489);
67
                add_sprite_offset(2144, 2, 0);
68
            }
69
        }
70
    }
71
    with (obj_item_knock_off_bar)
72
    {
73
        on_knock_away = function(arg0)
74
        {
75
            
scr_debug_print
scr_debug_print

function
scr_debug_print()
{ if (!
scr_debug())
exit; } function scr_debug_clear_all() { }
(string(x));
76
            var targx = x + (0.5 * sprite_width) + random_range(-10, 10);
77
            var targy = obj_mainchara.y - 100;
78
            with (arg0)
79
            {
80
                
scr_jump_to_point
scr_jump_to_point

function
scr_jump_to_point(arg0, arg1, arg2, arg3, arg4 = 0)
{ var ___jump =
scr_jump_to_point_sprite(arg0, arg1, arg2, arg3, 0, 0);
with (___jump) { trackalpha = arg4; trackblend = arg4; trackindex = arg4; tracksprite = arg4; trackangle = arg4; } return ___jump; }
(targx, targy, 12, 30, true);
81
                idling = true;
82
                t = -24;
83
                event_user(1);
84
                held = 0;
85
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ var _id = self; if (!is_struct(self)) _id = id; if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpcol() { if (argument_count < 6) ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]); else ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]); return ___lerpvar; }
("image_angle", 0, 720, 30);
86
            }
87
        };
88
        
89
        set_sprite = false;
90
    }
91
    if (scr_flag_get_ext(PROGRESS_FLAG, _FOX_BIT_1) == 0)
92
    {
93
        var gm_fox = scr_genmarker("hiding_fox");
94
        hiding_fox = instance_create(gm_fox.x, gm_fox.y, obj_marker_fancy);
95
        with (hiding_fox)
96
        {
97
            with (obj_castlereflect_manager)
98
            {
99
                add_reflection(other);
100
                add_sprite_offset(2861, 14, 0);
101
            }
102
            sprite_index = spr_dw_garden_fox_idle;
103
            image_speed = 0.25;
104
            con = 0;
105
            timer = 0;
106
            x += 20;
107
            hiding_index = 0;
108
            
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
109
            target_x = 0;
110
            target_y = 0;
111
            targettime = 0;
112
            fake_y = 0;
113
            fake_vspeed = 0;
114
            
115
            step_func = function()
116
            {
117
                reflect_jump_y = fake_y * -2;
118
            };
119
            
120
            draw_func = function()
121
            {
122
                y += fake_y;
123
                draw_self();
124
                y -= fake_y;
125
            };
126
        }
127
    }
128
    with (obj_terracotta_stationary_overworld)
129
    {
130
        if (extflag == "secret_fox" && scr_flag_get_ext(other.PROGRESS_FLAG, other._FOX_BIT_4))
131
            instance_destroy();
132
        if (attack_pattern == 2 && scr_flag_get_ext(other.PROGRESS_FLAG, other._TERA_SKIP_BIT))
133
            instance_destroy();
134
    }
135
    with (obj_overworld_foxbullet)
136
    {
137
        if (freq == 0.12 && is_fox)
138
            can_drop = false;
139
    }
140
    npc_rudinn = scr_makenpc_fromasset(findsprite(spr_enemy_aqua_idle, "NPCs"));
141
    foxgarden = scr_genmarker("foxgarden");
142
    foxes_counted = 0;
143
    if (instance_exists(npc_rudinn))
144
    {
145
        npc_rudinn.dialogue_side = 0;
146
        with (obj_castlereflect_manager)
147
        {
148
            add_reflection(other.npc_rudinn.marker);
149
            add_sprite_offset(6109, -2, 0);
150
        }
151
    }
152
    var extrafoxes = [1, 4, 5];
153
    for (var i = 0; i < 3; i++)
154
    {
155
        var v = extrafoxes[i];
156
        if (scr_flag_get_ext(PROGRESS_FLAG, v) == 1)
157
        {
158
            with (instance_create(0, 0, obj_overworld_foxbullet))
159
            {
160
                fox_index = v;
161
                sprite_index = spr_dw_garden_fox_run;
162
                var targetx = (other.foxgarden.x - 10) + (10 * other.foxes_counted);
163
                var targety = (other.foxgarden.y + 10) - (10 * other.foxes_counted);
164
                other.foxes_counted++;
165
                held = false;
166
                x = targetx;
167
                
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
168
                xstart = x;
169
                y = targety;
170
                ystart = y;
171
                move_pattern = 4;
172
                idling = false;
173
                amp_h = 10;
174
            }
175
        }
176
    }
177
    
scr_setnpclogic
scr_setnpclogic

function
scr_setnpclogic(arg0, arg1, arg2)
{ if (arg0 == -4) {
scr_debug_print("Failed to add NPC logic");
exit; } if (arg0.marker.sprite_index == spr_debug_40x40) arg0.marker.visible = 0; with (instance_create(0, 0, obj_npc_wrapper)) { if (variable_struct_exists(arg1, "animspeed")) animspeed = arg1.animspeed; if (variable_struct_exists(arg1, "typer")) typer = arg1.typer; if (variable_struct_exists(arg1, "alwaysanimate")) alwaysanimate = arg1.alwaysanimate; npc = arg0; if (!variable_instance_exists(npc.id, "dialogue_side")) npc.dialogue_side = -1; setdialogue = arg2; choices = []; for (var i = 3; i < argument_count; i++) array_push(choices, argument[i]); } }
(npc_rudinn,
178
    {
179
        alwaysanimate: true,
180
        animspeed: 0.25
181
    }, function(arg0)
182
    {
183
        if (obj_dw_fcastle_foxhunt.foxes_counted >= 3)
184
        {
185
            obj_dw_fcastle_foxhunt.encountercon = 1;
186
            global.interact = 1;
187
            with (obj_darkcontroller)
188
                charcon = 0;
189
            return -2;
190
        }
191
        else if (arg0)
192
        {
193
            if (obj_dw_fcastle_foxhunt.foxes_counted == 1)
194
            {
195
                
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; if (global.darkzone == 1) global.typer = 89; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("no_name");
196
                msgsetloc(0, 
* You've only found 1 fox.
* Can't you find any more?
* Kee hee hee.Wait for inputClose Message
"* You've only found 1 fox.&* Can't you find any more?&* Kee hee hee./%", "obj_dw_fcastle_foxhunt_slash_Step_0_gml_163_0"
);
197
            }
198
            else
199
            {
200
                
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; if (global.darkzone == 1) global.typer = 89; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("no_name");
201
                msgsetsubloc(0, 
* You've only found Argument â„–11 foxes.
* Can't you find any more?
* Kee hee hee.Wait for inputClose Message
"* You've only found ~1 foxes.&* Can't you find any more?&* Kee hee hee./%", obj_dw_fcastle_foxhunt.foxes_counted, "obj_dw_fcastle_foxhunt_slash_Step_0_gml_166_0"
);
202
            }
203
        }
204
        else
205
        {
206
            
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; if (global.darkzone == 1) global.typer = 89; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("no_name");
207
            msgsetloc(0, 
* Kee hee hee,Delay 11 Seth said not to let you pass...
* Under any circumstance!Wait for input
"* Kee hee hee^1, Seth said not to let you pass...&* Under any circumstance!/", "obj_dw_fcastle_foxhunt_slash_Step_0_gml_171_0"
);
208
            msgnextloc(
* Unless,Delay 11 you found at least 3 foxes.
* Seth said this.Wait for inputClose Message
"* Unless^1, you found at least \\cY3 foxes\\cW.&* Seth said this./%", "obj_dw_fcastle_foxhunt_slash_Step_0_gml_172_0"
);
209
        }
210
    });
211
    var room_solved = scr_get_bitmask_value(global.flag[PROGRESS_FLAG], _AQUA_BEATEN_BIT, 1, 1);
212
    if (room_solved)
213
    {
214
        with (npc_rudinn.marker)
215
            instance_destroy();
216
        with (npc_rudinn)
217
            instance_destroy();
218
        with (obj_overworld_foxbullet)
219
        {
220
            if (fox_index == 0)
221
                continue;
222
            if (fox_index > 3 || scr_get_bitmask_value(global.flag[other.PROGRESS_FLAG], fox_index, 1, 1))
223
                instance_destroy();
224
        }
225
    }
226
    else
227
    {
228
        with (obj_overworld_foxbullet)
229
        {
230
            if (fox_index >= 1 && fox_index <= 3 && scr_get_bitmask_value(global.flag[other.PROGRESS_FLAG], fox_index, 1, 1) == 1)
231
            {
232
                var targetx = (other.foxgarden.x - 10) + (10 * other.foxes_counted);
233
                var targety = (other.foxgarden.y + 10) - (10 * other.foxes_counted);
234
                other.foxes_counted++;
235
                held = false;
236
                x = targetx;
237
                xstart = x;
238
                y = targety;
239
                ystart = y;
240
                move_pattern = 4;
241
                idling = false;
242
                amp_h = 10;
243
            }
244
        }
245
    }
246
    unlock_door();
247
    if (scr_flag_get_ext(PROGRESS_FLAG, _FOX_BIT_5) == 0)
248
    {
249
        var spr = findspriteinfo(spr_yellow_sock, "NPCs", c_red);
250
        npc_shadowguy = instance_create(spr.x, spr.y, obj_marker_fusuma);
251
        npc_shadowguy.image_blend = c_white;
252
        with (obj_castlereflect_manager)
253
            add_reflection(other.npc_shadowguy);
254
        with (npc_shadowguy)
255
        {
256
            sprite_index = spr.sprite_index;
257
            image_xscale = spr.image_xscale;
258
            image_yscale = spr.image_yscale;
259
            __silhouette = 112;
260
            __sil_image_speed = 0.02;
261
            __sil_image_index = 0;
262
            
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
263
        }
264
        var genmarker = scr_genmarker("slide_fusuma");
265
        if (instance_exists(genmarker))
266
        {
267
            fusuma_interact = instance_create(genmarker.x, genmarker.y, obj_interactablesolid);
268
            fusuma_interact.image_xscale = 6;
269
            fusuma_interact.image_yscale = 2;
270
            with (fusuma_interact)
271
            {
272
                on_interact = function()
273
                {
274
                    obj_dw_fcastle_foxhunt.yellow_con = 1;
275
                    obj_dw_fcastle_foxhunt.yellow_timer = 0;
276
                    global.interact = 1;
277
                };
278
            }
279
        }
280
    }
281
    with (obj_castlereflect_manager)
282
    {
283
        add_reflection(540);
284
        add_sprite_offset(1472, 14, 0);
285
        add_sprite_offset(5592, 14, 0);
286
        add_sprite_offset(21, 29, 0);
287
        add_sprite_offset(3427, 16, -12);
288
        add_sprite_offset(4428, 10, 0);
289
        add_sprite_offset(4259, 20, 0);
290
        substitute_sprite(3427, 1053);
291
    }
292
}
293
event_user(1);
294
event_user(2);
295
if (encountercon == 1)
296
{
297
    encountercon = 2;
298
    global.interact = 1;
299
}
300
if (encountercon == 2)
301
{
302
    encountercon = 3;
303
    cutscene_master = 
scr_cutscene_make
scr_cutscene_make

function
scr_cutscene_make()
{ _cutscene_master = instance_create(0, 0, obj_cutscene_master); _cutscene_master.master_object = id; return _cutscene_master; }
();
304
    
scr_maincharacters_actors
scr_maincharacters_actors

function
scr_maincharacters_actors()
{ if (i_ex(obj_plat_player)) { scr_maincharacters_actors_plat(); exit; } actor_count = 0; kr = 0; kr_actor = instance_create(obj_mainchara.x, obj_mainchara.y, obj_actor);
scr_actor_setup(kr, kr_actor, "kris");
kr_actor.sprite_index = obj_mainchara.sprite_index; kr_actor.depth = obj_mainchara.depth; with (obj_mainchara) visible = 0; for (__jj = 0; __jj < array_length_1d(global.cinstance); __jj++) { if (i_ex(global.cinstance[__jj])) { if (global.cinstance[__jj].name == "susie") { actor_count++; su = __jj + 1; su_actor = instance_create(global.cinstance[__jj].x, global.cinstance[__jj].y, obj_actor);
scr_actor_setup(su, su_actor, "susie");
su_actor.sprite_index = global.cinstance[__jj].sprite_index; su_actor.depth = global.cinstance[__jj].depth; with (global.cinstance[__jj]) visible = 0; } if (global.cinstance[__jj].name == "ralsei") { actor_count++; ra = __jj + 1; ra_actor = instance_create(global.cinstance[__jj].x, global.cinstance[__jj].y, obj_actor);
scr_actor_setup(ra, ra_actor, "ralsei");
ra_actor.sprite_index = global.cinstance[__jj].sprite_index; ra_actor.depth = global.cinstance[__jj].depth; with (global.cinstance[__jj]) visible = 0; } if (global.cinstance[__jj].name == "noelle") { actor_count++; no = __jj + 1; no_actor = instance_create(global.cinstance[__jj].x, global.cinstance[__jj].y, obj_actor);
scr_actor_setup(no, no_actor, "noelle");
no_actor.sprite_index = global.cinstance[__jj].sprite_index; no_actor.depth = global.cinstance[__jj].depth; with (global.cinstance[__jj]) visible = 0; } } } }
();
305
    
c_customfunc
c_customfunc

function
c_customfunc(arg0, arg1 = -1)
{ if (instance_exists(obj_cutscene_master)) { with (obj_cutscene_master) array_push(customfuncs, arg0);
c_cmd("customfunc", arg1, 0, 0, 0);
} }
(function()
306
    {
307
        with (obj_overworld_foxbullet)
308
        {
309
            if (
scr_onscreen
scr_onscreen

function
scr_onscreen(arg0)
{ __obj = arg0; var __cx = camera_get_view_x(view_camera[0]); var __cy = camera_get_view_y(view_camera[0]); if ((__obj.x + __obj.sprite_width) < __cx || __obj.x > (__cx + 640) || (__obj.y + __obj.sprite_height) < __cy || __obj.y > (__cy + 480)) return false; else return true; }
(self) && x < obj_mainchara.x)
310
            {
311
                idling = true;
312
                reflect_jump_y = 0;
313
                image_xscale = 2;
314
            }
315
        }
316
    });
317
    npc_rudinn.marker.sprite_index = spr_enemy_aqua_laugh;
318
    
c_msgside
c_msgside

function
c_msgside(arg0)
{
c_cmd("msgside", arg0, 0, 0, 0);
}
("top");
319
    
c_speaker
c_speaker

function
c_speaker(arg0)
{
c_cmd("speaker", arg0, 0, 0, 0);
}
("no_name");
320
    
c_msgsetloc
c_msgsetloc

function
c_msgsetloc(arg0, arg1, arg2)
{ var msg_index = arg0; var english = arg1; var localized_string_id = arg2; var str = english; if (!is_english()) str =
scr_84_get_lang_string(localized_string_id);
c_msgset(msg_index, str);
}
(0,
* Kee hee hee...Wait for input
"* Kee hee hee.../", "obj_dw_fcastle_foxhunt_slash_Step_0_gml_321_0"
);
321
    
c_msgnextloc
c_msgnextloc

function
c_msgnextloc(arg0, arg1)
{ var str = arg0; var localized_string_id = arg1; if (!is_english()) str =
scr_84_get_lang_string(localized_string_id);
c_msgnext(str);
}
(
* You found the foxes,Delay 11
you found the foxes!Wait for inputClose Message
"* You found the foxes^1,&you found the foxes!/%", "obj_dw_fcastle_foxhunt_slash_Step_0_gml_322_0"
);
322
    
c_talk_wait
c_talk_wait

function
c_talk_wait()
{
c_talk();
c_waittalk();
} function c_talkwait() {
c_talk_wait();
}
();
323
    
c_var_instance
c_var_instance

function
c_var_instance(arg0, arg1, arg2)
{
c_cmd_x("var", arg0, arg1, arg2, 0, 0, 0);
}
(npc_rudinn.marker, "sprite_index", spr_enemy_aqua_spin);
324
    
c_customfunc
c_customfunc

function
c_customfunc(arg0, arg1 = -1)
{ if (instance_exists(obj_cutscene_master)) { with (obj_cutscene_master) array_push(customfuncs, arg0);
c_cmd("customfunc", arg1, 0, 0, 0);
} }
(function(arg0)
325
    {
326
        var wait = 1;
327
        var wait2 = 10;
328
        var yy = 0;
329
        with (obj_overworld_foxbullet)
330
        {
331
            if (
scr_onscreen
scr_onscreen

function
scr_onscreen(arg0)
{ __obj = arg0; var __cx = camera_get_view_x(view_camera[0]); var __cy = camera_get_view_y(view_camera[0]); if ((__obj.x + __obj.sprite_width) < __cx || __obj.x > (__cx + 640) || (__obj.y + __obj.sprite_height) < __cy || __obj.y > (__cy + 480)) return false; else return true; }
(self) && x < obj_mainchara.x)
332
            {
333
                
scr_script_delayed
scr_script_delayed

function
scr_script_delayed()
{ var __scriptdelay = instance_create(0, 0, obj_script_delayed); __scriptdelay.script = argument[0]; __scriptdelay.alarm[0] = argument[1]; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 2); __i++) __scriptdelay.script_arg[__i] = argument[__i + 2]; __scriptdelay.arg_count = argument_count - 2; return __scriptdelay; } function scr_script_delayed_until() { var __scriptdelay = instance_create(0, 0, obj_script_delayed_function); __scriptdelay.script = argument[0]; __scriptdelay.condition = argument[1]; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 2); __i++) __scriptdelay.script_arg[__i] = argument[__i + 2]; __scriptdelay.arg_count = argument_count - 2; return __scriptdelay; } function delay_function(arg0, arg1) { return
scr_script_delayed(arg0, arg1);
}
(function(arg0)
334
                {
335
                    with (arg0[0])
336
                    {
337
                        move_pattern = -1;
338
                        depth = 16000;
339
                        skipdepth = true;
340
                        snd_play(snd_petaldrain, 1, 2);
341
                        sprite_index = spr_dw_garden_fox_held;
342
                        var jtp = 
scr_jump_to_point
scr_jump_to_point

function
scr_jump_to_point(arg0, arg1, arg2, arg3, arg4 = 0)
{ var ___jump =
scr_jump_to_point_sprite(arg0, arg1, arg2, arg3, 0, 0);
with (___jump) { trackalpha = arg4; trackblend = arg4; trackindex = arg4; tracksprite = arg4; trackangle = arg4; } return ___jump; }
(arg0[1], arg0[2], 12, 15, false);
343
                        jtp.customdepth = true;
344
                        scr_delay_var("sprite_index", 2861, 15);
345
                    }
346
                }, wait, [self, arg0[0], arg0[1] + yy]);
347
                wait += 8;
348
                yy -= 30;
349
                wait2 += 8;
350
            }
351
        }
352
        
scr_script_delayed
scr_script_delayed

function
scr_script_delayed()
{ var __scriptdelay = instance_create(0, 0, obj_script_delayed); __scriptdelay.script = argument[0]; __scriptdelay.alarm[0] = argument[1]; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 2); __i++) __scriptdelay.script_arg[__i] = argument[__i + 2]; __scriptdelay.arg_count = argument_count - 2; return __scriptdelay; } function scr_script_delayed_until() { var __scriptdelay = instance_create(0, 0, obj_script_delayed_function); __scriptdelay.script = argument[0]; __scriptdelay.condition = argument[1]; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 2); __i++) __scriptdelay.script_arg[__i] = argument[__i + 2]; __scriptdelay.arg_count = argument_count - 2; return __scriptdelay; } function delay_function(arg0, arg1) { return
scr_script_delayed(arg0, arg1);
}
(c_waitcustom_end, wait2);
353
    }, [npc_rudinn.x + 40, npc_rudinn.y - 10]);
354
    
c_waitcustom
c_waitcustom

function
c_waitcustom()
{
c_cmd("waitcustom", 0, 0, 0, 0);
}
();
355
    
c_wait
c_wait

function
c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
}
(5);
356
    
c_customfunc
c_customfunc

function
c_customfunc(arg0, arg1 = -1)
{ if (instance_exists(obj_cutscene_master)) { with (obj_cutscene_master) array_push(customfuncs, arg0);
c_cmd("customfunc", arg1, 0, 0, 0);
} }
(function(arg0)
357
    {
358
        snd_play(snd_wing);
359
        with (instance_create(arg0[0].x - 40, arg0[0].y - 160, obj_animation))
360
        {
361
            sprite_index = spr_poof;
362
            image_xscale = 2;
363
            image_yscale = 3;
364
            image_speed = 0.5;
365
        }
366
    }, [npc_rudinn]);
367
    
c_wait
c_wait

function
c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
}
(5);
368
    
c_customfunc
c_customfunc

function
c_customfunc(arg0, arg1 = -1)
{ if (instance_exists(obj_cutscene_master)) { with (obj_cutscene_master) array_push(customfuncs, arg0);
c_cmd("customfunc", arg1, 0, 0, 0);
} }
(function(arg0)
369
    {
370
        with (obj_overworld_foxbullet)
371
        {
372
            if (idling && 
scr_onscreen
scr_onscreen

function
scr_onscreen(arg0)
{ __obj = arg0; var __cx = camera_get_view_x(view_camera[0]); var __cy = camera_get_view_y(view_camera[0]); if ((__obj.x + __obj.sprite_width) < __cx || __obj.x > (__cx + 640) || (__obj.y + __obj.sprite_height) < __cy || __obj.y > (__cy + 480)) return false; else return true; }
(self))
373
                instance_destroy();
374
        }
375
        with (obj_dw_fcastle_foxhunt)
376
        {
377
            laughing_fox = instance_create(arg0[0].x + 80, arg0[0].y - 40, obj_marker);
378
            with (laughing_fox)
379
            {
380
                with (obj_castlereflect_manager)
381
                    add_reflection(other.id);
382
                sprite_index = spr_tree_fox_laugh;
383
                image_xscale = -2;
384
                image_yscale = 2;
385
                snd_play(snd_creepylaugh);
386
                image_speed = 0.5;
387
                
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
388
            }
389
        }
390
        with (arg0[0].marker)
391
            instance_destroy();
392
        with (arg0[0])
393
            instance_destroy();
394
    }, [npc_rudinn]);
395
    
c_sel
c_sel

function
c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
}
(kr);
396
    
c_facing
c_facing

function
c_facing(arg0)
{
c_cmd("facing", arg0, 0, 0, 0);
}
("l");
397
    
c_sel
c_sel

function
c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
}
(su);
398
    
c_sprite
c_sprite

function
c_sprite(arg0)
{
c_cmd("sprite", arg0, 0, 0, 0);
}
(spr_susie_shock);
399
    
c_sel
c_sel

function
c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
}
(ra);
400
    
c_sprite
c_sprite

function
c_sprite(arg0)
{
c_cmd("sprite", arg0, 0, 0, 0);
}
(spr_ralsei_shocked_left);
401
    
c_wait
c_wait

function
c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
}
(20);
402
    
c_speaker
c_speaker

function
c_speaker(arg0)
{
c_cmd("speaker", arg0, 0, 0, 0);
}
("no_name");
403
    
c_msgsetloc
c_msgsetloc

function
c_msgsetloc(arg0, arg1, arg2)
{ var msg_index = arg0; var english = arg1; var localized_string_id = arg2; var str = english; if (!is_english()) str =
scr_84_get_lang_string(localized_string_id);
c_msgset(msg_index, str);
}
(0,
* But,Delay 11 you missed one~Wait for inputClose Message
"* But^1, you missed one~/%", "obj_dw_fcastle_foxhunt_slash_Step_0_gml_407_0"
);
404
    
c_talk_wait
c_talk_wait

function
c_talk_wait()
{
c_talk();
c_waittalk();
} function c_talkwait() {
c_talk_wait();
}
();
405
    
c_actortokris
c_actortokris

function
c_actortokris()
{
c_cmd("actortokris", 0, 0, 0, 0);
}
();
406
    
c_actortocaterpillar
c_actortocaterpillar

function
c_actortocaterpillar()
{
c_cmd("actortocaterpillar", 0, 0, 0, 0);
} function c_actortocaterpillarstill() {
c_cmd("actortocaterpillarstill", 0, 0, 0, 0);
}
();
407
    
c_pannable
c_pannable

function
c_pannable(arg0)
{
c_cmd("pannable", arg0, 0, 0, 0);
}
(0);
408
    
c_customfunc
c_customfunc

function
c_customfunc(arg0, arg1 = -1)
{ if (instance_exists(obj_cutscene_master)) { with (obj_cutscene_master) array_push(customfuncs, arg0);
c_cmd("customfunc", arg1, 0, 0, 0);
} }
(function()
409
    {
410
        
scr_caterpillar_interpolate
scr_caterpillar_interpolate

function
scr_caterpillar_interpolate(arg0 = "none")
{ if (arg0 == "all") { with (obj_caterpillarchara) scr_caterpillar_interpolate_old(); } else if (arg0 == "none") { if (object_index == obj_caterpillarchara) scr_caterpillar_interpolate_old(); } else { with (obj_caterpillarchara) { if (name == arg0) scr_caterpillar_interpolate_old(); } } } function scr_caterinterp(arg0 = "none") {
scr_caterpillar_interpolate(arg0);
} function scr_caterpillar_interpolate_old() { var _newfacing = direction_to_object_bbox(id, 1200, true); remx[0] = obj_mainchara.x; remy[0] = obj_mainchara.y; facing[0] = _newfacing; for (var _iaia = target; _iaia > 0; _iaia -= 1) { remx[_iaia] = lerp(obj_mainchara.x, x + halign, _iaia / target); remy[_iaia] = lerp(obj_mainchara.y, y + valign, _iaia / target); facing[_iaia] = _newfacing; } }
("all");
411
    });
412
    
c_terminatekillactors
c_terminatekillactors

function
c_terminatekillactors()
{
c_cmd("terminatekillactors", 0, 0, 0, 0);
}
();
413
}
414
if (encountercon == 3 && !i_ex(obj_cutscene_master))
415
{
416
    global.interact = 0;
417
    with (laughing_fox)
418
    {
419
        image_xscale = 2;
420
        x -= sprite_width;
421
        touchsprite = sprite_index;
422
        whichmonster = 0;
423
        myencounter = 229;
424
        global.tempflag[54] = 1;
425
    }
426
    global.flag[PROGRESS_FLAG] = scr_set_bitmask_value(global.flag[PROGRESS_FLAG], _AQUA_BEATEN_BIT, 1, 1);
427
    
scr_plat_encounter
scr_plat_encounter

function
scr_plat_encounter(arg0, arg1 = -1, arg2 = false)
{ with (obj_plat_game) paused = true; if (!instance_exists(obj_mainchara)) { with (obj_plat_player) { var mc = instance_create(x, y, obj_mainchara); mc.sprite_index = sprite_index; mc.image_index = image_index; mc.image_speed = 0; mc.cutscene = 1; mc.doorcooldown = 99999999; mc.fun = 1; mc.depth = depth; } } with (obj_plat_player) instance_destroy(); with (obj_plat_follower) { restore_default_behavior(); with (back_marker)
scr_doom(self, 30).respects_platmode = false;
var cp = instance_create(x, y, obj_caterpillarchara); with (cp) { depth = other.depth; name = other.name; initialize(); x = other.x; y = other.y; sprite_index = other.sprite_index; image_index = other.image_index; image_speed = 0; fun = 1; follow = 0; var after_sprite = sprite_index; if (name == "ralsei") { after_sprite = 4382; parent = obj_mainchara; target = 24; global.cinstance[1] = id; } else { after_sprite = 8058; parent = obj_mainchara; global.cinstance[0] = id; } image_xscale = other.image_xscale; encounter_return_offset = [after_sprite, sprite_xoffset, sprite_yoffset, 2]; } instance_destroy(); } if (is_array(arg0)) { for (var i = 0; i < array_length(arg0); i++) { with (arg0[i]) { newme = instance_create(x, y, obj_testoverworldenemy); newme.image_xscale = image_xscale; newme.image_yscale = image_yscale; newme.sprite_index = touchsprite; newme.touchsprite = touchsprite; newme.slidesprite = sprite_index; newme.depth = depth; newme.silent = arg2; newme.eraser = false; newme.washit = false; newme.whichmonster = whichmonster; newme.platmode = true; if (i == 0) { if (arg1 > 0) global.flag[54 encounter_pointer] = arg1; global.flag[55 enemy_x] = x; global.flag[56 enemy_y] = y; global.encounterno = myencounter; with (newme) event_user(0); } } } } else { with (arg0) { if (arg1 > 0) global.flag[54 encounter_pointer] = arg1; global.flag[55 enemy_x] = x; global.flag[56 enemy_y] = y; newme = instance_create(x, y, obj_testoverworldenemy); newme.image_xscale = image_xscale; newme.image_yscale = image_yscale; newme.sprite_index = touchsprite; newme.touchsprite = touchsprite; ...
(laughing_fox);
428
    encountercon = 4;
429
    with (obj_overworld_foxbullet)
430
    {
431
        if (fox_index > 3)
432
            instance_destroy();
433
    }
434
    with (laughing_fox)
435
        instance_destroy();
436
}
437
if (obj_darkcontroller.charcon == 1 && 
scr_trigcheck
scr_trigcheck

function
scr_trigcheck(arg0)
{ var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, obj_mainchara)) ____trig++; } } } return ____trig; } function scr_trigcheck_ext(arg0, arg1 = id) { var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, arg1)) ____trig++; } } } return ____trig; }
("depositfox"))
438
    obj_darkcontroller.charcon = 0;
439
if ((obj_mainchara.holding_item != -4 && 
scr_trigcheck
scr_trigcheck

function
scr_trigcheck(arg0)
{ var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, obj_mainchara)) ____trig++; } } } return ____trig; } function scr_trigcheck_ext(arg0, arg1 = id) { var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, arg1)) ____trig++; } } } return ____trig; }
("depositfox")) || falling_fox != -4)
440
{
441
    var target_fox = falling_fox;
442
    if (falling_fox == -4)
443
        target_fox = obj_mainchara.holding_item;
444
    with (target_fox)
445
    {
446
        var _is_fox = true;
447
        if (object_index == obj_overworld_foxbullet)
448
        {
449
            if (pickup_style >= 2)
450
                _is_fox = false;
451
        }
452
        if (!_is_fox)
453
            break;
454
        with (instance_create(x - 80, y - 120, obj_animation))
455
        {
456
            sprite_index = spr_poof;
457
            image_xscale = 2;
458
            depth = other.depth - 10;
459
            image_yscale = 2;
460
            image_speed = 0.5;
461
        }
462
        var targetx = (other.foxgarden.x - 10) + (10 * other.foxes_counted);
463
        var targety = (other.foxgarden.y + 10) - (10 * other.foxes_counted);
464
        held = false;
465
        x = targetx;
466
        xstart = x;
467
        y = targety;
468
        ystart = y;
469
        other.foxes_counted++;
470
        pickup_cooldown = 1000;
471
        scr_delay_var("x", targetx, 1);
472
        snd_play(snd_wing);
473
        var room_solved = scr_get_bitmask_value(global.flag[other.PROGRESS_FLAG], other._AQUA_BEATEN_BIT, 1, 1);
474
        if (!room_solved)
475
        {
476
            with (instance_create(targetx - 80, targety - 120, obj_animation))
477
            {
478
                sprite_index = spr_poof;
479
                image_xscale = 2;
480
                image_yscale = 2;
481
                image_speed = 0.5;
482
            }
483
        }
484
        else
485
        {
486
            y = 100000;
487
            ystart = y;
488
            targety = y;
489
        }
490
        scr_delay_var("y", targety, 1);
491
        global.flag[other.PROGRESS_FLAG] = scr_set_bitmask_value(global.flag[other.PROGRESS_FLAG], fox_index, 1, 1);
492
        other.collect_fox();
493
        move_pattern = 4;
494
        idling = false;
495
        amp_h = 10;
496
        if (other.falling_fox == -4)
497
            obj_mainchara.holding_item = -4;
498
        other.falling_fox = -4;
499
    }
500
}
501
with (obj_floorswitch)
502
{
503
    if (pressed && maincharapressable)
504
    {
505
        with (obj_plat_fusumawall)
506
        {
507
            if (extflag == other.extflag)
508
            {
509
                if (extflag == "fusuma1")
510
                {
511
                    if (y < (other.y - 100))
512
                    {
513
                        y = 
scr_approach
scr_approach

function
scr_approach(arg0, arg1, arg2)
{ if (arg0 < arg1) { arg0 += arg2; if (arg0 > arg1) return arg1; } else { arg0 -= arg2; if (arg0 < arg1) return arg1; } return arg0; }
(y, ystart - 260, 6);
514
                        stalk_height = 40 + abs(y - ystart);
515
                        depth_yoffset = ystart - y;
516
                        reflect_jump_y = 2 * depth_yoffset;
517
                    }
518
                }
519
                else
520
                {
521
                    if (!variable_instance_exists(id, "ttimer"))
522
                        ttimer = 0;
523
                    ttimer++;
524
                    var t = ttimer % 120;
525
                    if (t < 15)
526
                        x = xstart + (t * 4);
527
                    if (t > 45 && t < 75)
528
                        x = (xstart + 60) - ((t - 45) * 4);
529
                    if (t > 105)
530
                        x = (xstart - 60) + ((t - 105) * 4);
531
                }
532
            }
533
        }
534
    }
535
    else
536
    {
537
        with (obj_plat_fusumawall)
538
        {
539
            if (extflag == other.extflag)
540
            {
541
                if (extflag == "fusuma1")
542
                {
543
                    if (y < (other.y - 100))
544
                    {
545
                        var lasty = y;
546
                        y = 
scr_approach
scr_approach

function
scr_approach(arg0, arg1, arg2)
{ if (arg0 < arg1) { arg0 += arg2; if (arg0 > arg1) return arg1; } else { arg0 -= arg2; if (arg0 < arg1) return arg1; } return arg0; }
(y, ystart, 12);
547
                        depth_yoffset = ystart - y;
548
                        reflect_jump_y = 2 * depth_yoffset;
549
                        stalk_height = 40 + abs(y - ystart);
550
                        if (y == ystart && y != lasty)
551
                            snd_play(snd_locker);
552
                    }
553
                }
554
                else
555
                {
556
                }
557
            }
558
        }
559
    }
560
}
561
if (bullet_flip == 0)
562
{
563
    if (
scr_trigcheck
scr_trigcheck

function
scr_trigcheck(arg0)
{ var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, obj_mainchara)) ____trig++; } } } return ____trig; } function scr_trigcheck_ext(arg0, arg1 = id) { var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, arg1)) ____trig++; } } } return ____trig; }
("flip_bullets_1"))
564
    {
565
        bullet_flip = 1;
566
        with (obj_overworld_foxbullet)
567
        {
568
            if (freq == 0.12 && !held && !idling)
569
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ var _id = self; if (!is_struct(self)) _id = id; if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpcol() { if (argument_count < 6) ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]); else ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]); return ___lerpvar; }
("timer_inc", timer_inc, -timer_inc, 20);
570
        }
571
    }
572
}
573
else if (
scr_trigcheck
scr_trigcheck

function
scr_trigcheck(arg0)
{ var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, obj_mainchara)) ____trig++; } } } return ____trig; } function scr_trigcheck_ext(arg0, arg1 = id) { var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, arg1)) ____trig++; } } } return ____trig; }
("flip_bullets_0"))
574
{
575
    bullet_flip = 0;
576
    with (obj_overworld_foxbullet)
577
    {
578
        if (freq == 0.12 && !held && !idling)
579
            
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ var _id = self; if (!is_struct(self)) _id = id; if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpcol() { if (argument_count < 6) ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]); else ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]); return ___lerpvar; }
("timer_inc", timer_inc, -timer_inc, 20);
580
    }
581
}
582
if (
scr_trigcheck
scr_trigcheck

function
scr_trigcheck(arg0)
{ var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, obj_mainchara)) ____trig++; } } } return ____trig; } function scr_trigcheck_ext(arg0, arg1 = id) { var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, arg1)) ____trig++; } } } return ____trig; }
("fusuma_scroll"))
583
{
584
    var gm_leftbound = scr_genmarker("fusuma_scroll_left");
585
    var gm_rightbound = scr_genmarker("fusuma_scroll_right");
586
    var fusuma_scroll_distance = -320;
587
    with (obj_plat_fusumawall)
588
    {
589
        if (extflag == "fusuma_scroll")
590
            x = xstart + (clamp01(inverselerp(gm_leftbound.x, gm_rightbound.x, obj_mainchara.x)) * fusuma_scroll_distance);
591
    }
592
}
593
with (hiding_fox)
594
{
595
    fake_vspeed += 6.5;
596
    fake_y += fake_vspeed;
597
    fake_y = min(fake_y, 0);
598
    timer++;
599
    
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
(self);
600
    if (direction > 90 && direction < 270)
601
        image_xscale = -2;
602
    else
603
        image_xscale = 2;
604
    if (con == 0)
605
    {
606
        if (point_distance(x, y, mean(obj_mainchara.bbox_left, obj_mainchara.bbox_right), obj_mainchara.bbox_top) < 80)
607
        {
608
            con = 1;
609
            timer = 0;
610
            last_x = x;
611
            last_y = y;
612
            if (hiding_index == 2)
613
            {
614
                var bit = scr_flag_get_ext(other.PROGRESS_FLAG, other._TERA_SKIP_BIT);
615
                with (obj_terracotta_stationary_overworld)
616
                {
617
                    if (extflag == "flank_left" && bit == 0)
618
                    {
619
                        attack_pattern = 2;
620
                        pushable = false;
621
                        x = xstart + 80;
622
                        y = ystart;
623
                        sprite_index = spr_terracotta_overworld_attack_noeyes;
624
                        with (block)
625
                            instance_destroy();
626
                        with (interact)
627
                            instance_destroy();
628
                    }
629
                    if (extflag == "flank_right" && bit == 0)
630
                    {
631
                        attack_pattern = 2;
632
                        pushable = false;
633
                        x = xstart - 80;
634
                        sprite_index = spr_terracotta_overworld_attack_noeyes;
635
                        with (block)
636
                            instance_destroy();
637
                        with (interact)
638
                            instance_destroy();
639
                    }
640
                    if (extflag == "kill_on_reentry")
641
                        instance_destroy();
642
                }
643
            }
644
            hiding_index++;
645
            snd_play(snd_escaped);
646
            var gm = scr_genmarker("foxflee_" + string(hiding_index));
647
            target_x = gm.x + 20;
648
            target_y = gm.y + 20;
649
            var li = ds_list_create();
650
            collision_rectangle_list(target_x - 40, target_y - 20, target_x + 40, target_y + 60, obj_terracotta_stationary_overworld, false, true, li, false);
651
            for (var i = 0; i < ds_list_size(li); i++)
652
                instance_destroy(ds_list_find_value(li, i));
653
            ds_list_destroy(li);
654
            direction = point_direction(x, y, target_x, target_y);
655
            speed = 12;
656
            targettime = point_distance(x, y, target_x, target_y) / speed;
657
        }
658
    }
659
    else if (con == 1)
660
    {
661
        if (fake_y == 0)
662
        {
663
            snd_play(snd_petaldrain, 0.5, 2);
664
            fake_vspeed = -20;
665
        }
666
        if (timer >= targettime)
667
        {
668
            x = target_x;
669
            y = target_y;
670
            speed = 0;
671
            con = 0;
672
            if (hiding_index == 4)
673
            {
674
                other.collect_fox(1);
675
                instance_destroy();
676
            }
677
        }
678
    }
679
}
680
if (yellow_con == 1)
681
{
682
    yellow_timer++;
683
    var opentime = 5;
684
    var screamtime = opentime + 25;
685
    var pooftime = screamtime + 15;
686
    var scream2time = pooftime + 25;
687
    var poof2time = scream2time + 15;
688
    var closetime = poof2time + 15;
689
    var restoretime = closetime + 10;
690
    if (yellow_timer == 1)
691
    {
692
        with (obj_plat_fusumawall)
693
        {
694
            if (extflag == "sliding_fusuma")
695
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ var _id = self; if (!is_struct(self)) _id = id; if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpcol() { if (argument_count < 6) ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]); else ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]); return ___lerpvar; }
("x", xstart, xstart - 120, opentime, 1, "out");
696
        }
697
        snd_play(snd_wing);
698
        with (npc_shadowguy)
699
            
scr_animate
scr_animate

function
scr_animate(arg0, arg1, arg2)
{ __animator = instance_create(x, y, obj_animator); __animator.target = id; __animator.initframe = arg0; __animator.endframe = arg1; __animator.fake_image_speed = arg2; return __animator; }
(0, 2, 2 / (closetime - screamtime));
700
    }
701
    if (yellow_timer == screamtime)
702
    {
703
        snd_play(snd_scream, 1, 1);
704
        with (npc_shadowguy)
705
        {
706
            sprite_index = spr_yellow_sockshock;
707
            
scr_shakeobj
scr_shakeobj

function
scr_shakeobj()
{ var _shakeobj = instance_create(x, y, obj_shakeobj); _shakeobj.target = id; if (argument_count >= 1) { if (i_ex(argument0)) _shakeobj.target = argument0; } if (argument_count >= 2) { if (argument1 != -1) _shakeobj.shakeamt = argument1; } if (argument_count >= 3) { if (argument2 != -1) _shakeobj.shakereduct = argument2; } with (_shakeobj) event_user(0); }
();
708
        }
709
    }
710
    if (yellow_timer == scream2time)
711
    {
712
        snd_play(snd_scream, 1, 1.2);
713
        with (npc_shadowguy)
714
        {
715
            imaage_index = 0;
716
            
scr_shakeobj
scr_shakeobj

function
scr_shakeobj()
{ var _shakeobj = instance_create(x, y, obj_shakeobj); _shakeobj.target = id; if (argument_count >= 1) { if (i_ex(argument0)) _shakeobj.target = argument0; } if (argument_count >= 2) { if (argument1 != -1) _shakeobj.shakeamt = argument1; } if (argument_count >= 3) { if (argument2 != -1) _shakeobj.shakereduct = argument2; } with (_shakeobj) event_user(0); }
();
717
        }
718
    }
719
    if (yellow_timer == pooftime || yellow_timer == poof2time)
720
    {
721
        snd_stop(snd_scream);
722
        snd_play(snd_wing);
723
        var xx = -50;
724
        var yy = -20;
725
        if (yellow_timer == poof2time)
726
        {
727
            xx = -50;
728
            yy = -80;
729
        }
730
        with (instance_create(npc_shadowguy.x + xx, npc_shadowguy.y + yy, obj_animation))
731
        {
732
            sprite_index = spr_poof;
733
            image_xscale = 2;
734
            image_yscale = 2;
735
            image_speed = 0.5;
736
            depth = 50000;
737
        }
738
        if (yellow_timer == pooftime)
739
        {
740
        }
741
        else
742
        {
743
            with (npc_shadowguy)
744
                
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ var _doom = instance_create_depth(0, 0, 0, obj_doom); with (_doom) { alarm[0] = arg1; target = arg0; } return _doom; }
(self, 4);
745
            other.collect_fox(5);
746
        }
747
    }
748
    if (yellow_timer == (pooftime + 20))
749
    {
750
        with (npc_shadowguy)
751
            image_index = 1;
752
    }
753
    if (yellow_timer == (pooftime + 4))
754
    {
755
        with (npc_shadowguy)
756
        {
757
            sprite_index = spr_dw_garden_fox_sock;
758
            image_index = 0;
759
            x += 20;
760
            y += 60;
761
        }
762
    }
763
    if (yellow_timer == closetime)
764
    {
765
        with (obj_plat_fusumawall)
766
        {
767
            if (extflag == "sliding_fusuma")
768
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ var _id = self; if (!is_struct(self)) _id = id; if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpcol() { if (argument_count < 6) ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]); else ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]); return ___lerpvar; }
("x", xstart - 120, xstart, opentime, 1, "out");
769
        }
770
        snd_play(snd_wing);
771
        with (npc_shadowguy)
772
        {
773
            scr_delay_var("sprite_index", 8091, restoretime - closetime);
774
            scr_delay_var("image_index", 0, restoretime - closetime);
775
        }
776
    }
777
    if (yellow_timer >= restoretime)
778
    {
779
        global.interact = 0;
780
        yellow_con = 0;
781
        yellow_timer = 0;
782
        with (other.fusuma_interact)
783
            instance_destroy();
784
    }
785
}
786
if (i_ex(obj_battlecontroller) && !set_teraskip)
787
{
788
    set_teraskip = true;
789
    scr_flag_set_ext(PROGRESS_FLAG, _TERA_SKIP_BIT, 1);
790
}
791
if (
scr_trigcheck
scr_trigcheck

function
scr_trigcheck(arg0)
{ var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, obj_mainchara)) ____trig++; } } } return ____trig; } function scr_trigcheck_ext(arg0, arg1 = id) { var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, arg1)) ____trig++; } } } return ____trig; }
("reset_tera"))
792
    reset_tera_skip_bit = true;
793
if (
scr_trigcheck
scr_trigcheck

function
scr_trigcheck(arg0)
{ var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, obj_mainchara)) ____trig++; } } } return ____trig; } function scr_trigcheck_ext(arg0, arg1 = id) { var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, arg1)) ____trig++; } } } return ____trig; }
("no_reset_tera"))
794
    reset_tera_skip_bit = false;
795
if (!door_is_open && room == room_dw_fcastle_foxhunt_terakota)
796
{
797
    if (!scr_trigcheck_ext("door_blocked", 1613))
798
    {
799
        door_is_open = true;
800
        snd_play(snd_locker);
801
        
scr_shakescreen
scr_shakescreen

function
scr_shakescreen(arg0 = 4)
{ with (instance_create(x, y, obj_shake)) { shakex = arg0; shakey = arg0; } }
();
802
        var lay = layer_get_id("FAKE_DOOR");
803
        scr_flag_set_ext(PROGRESS_FLAG, _DOOR_OPEN_BIT, 1);
804
        layer_set_visible(lay, false);
805
        with (obj_solidblocksized_alt)
806
            instance_destroy();
807
    }
808
}
809
if (myinteract == 3)
810
{
811
    if (i_ex(mydialoguer) == false)
812
    {
813
        global.interact = 0;
814
        myinteract = 0;
815
        with (obj_mainchara)
816
            onebuffer = 5;
817
    }
818
}
819
if (myinteract == 4 && global.choice >= 0)
820
{
821
    k_d(1);
822
    if (global.choice == 0)
823
    {
824
        
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; if (global.darkzone == 1) global.typer = 89; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("susie");
825
        msgsetloc(0, 
Face y* Yea...Wait for input
"\\Ey* Yea.../", "obj_dw_fcastle_foxhunt_slash_Step_0_gml_808_0"
);
826
        
scr_anyface_next
scr_anyface_next

function
scr_anyface_next(arg0, arg1)
{ global.msgno++;
scr_anyface(arg0, global.msgno, arg1);
}
("ralsei", "y");
827
        msgnextloc(
Face y* Y...Delay 11 yea...Wait for inputClose Message
"\\Ey* Y..^1. yea.../%", "obj_dw_fcastle_foxhunt_slash_Step_0_gml_810_0"
);
828
        mydialoguer = d_make();
829
        myinteract = 3;
830
    }
831
    else
832
    {
833
        
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; if (global.darkzone == 1) global.typer = 89; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("ralsei");
834
        msgsetloc(0, 
Face K* O-oh...!Delay 11 Sorry I made you yell small at me,Delay 11 Kris.Wait for input
"\\EK* O-oh...^1! Sorry I made you yell small at me^1, Kris./", "obj_dw_fcastle_foxhunt_slash_Step_0_gml_818_0"
);
835
        msgnextloc(
Face K* Little,Delay 11 um...Delay 11 yell.Wait for input
"\\EK* Little^1, um..^1. yell./", "obj_dw_fcastle_foxhunt_slash_Step_0_gml_819_0"
);
836
        msgnextloc(
Face L* And,Delay 11 umm,Delay 11 you don't have to keep saying,Delay 11 um...Wait for input
"\\EL* And^1, umm^1, you don't have to keep saying^1, um.../", "obj_dw_fcastle_foxhunt_slash_Step_0_gml_820_0"
);
837
        msgnextloc(
Face K* "Exclamation point" over and over...Wait for input
"\\EK* \"Exclamation point\" over and over.../", "obj_dw_fcastle_foxhunt_slash_Step_0_gml_821_0"
);
838
        
scr_anyface_next
scr_anyface_next

function
scr_anyface_next(arg0, arg1)
{ global.msgno++;
scr_anyface(arg0, global.msgno, arg1);
}
("susie", "y");
839
        msgnextloc(
Face y* Yea they do.Wait for inputClose Message
"\\Ey* Yea they do./%", "obj_dw_fcastle_foxhunt_slash_Step_0_gml_823_0"
);
840
        mydialoguer = d_make();
841
        myinteract = 3;
842
    }
843
}
844
with (obj_terracotta_stationary_overworld)
845
{
846
    if (y >= 1240 && con != -2)
847
    {
848
        if (!
scr_onscreen
scr_onscreen

function
scr_onscreen(arg0)
{ __obj = arg0; var __cx = camera_get_view_x(view_camera[0]); var __cy = camera_get_view_y(view_camera[0]); if ((__obj.x + __obj.sprite_width) < __cx || __obj.x > (__cx + 640) || (__obj.y + __obj.sprite_height) < __cy || __obj.y > (__cy + 480)) return false; else return true; }
(self))
849
        {
850
            with (block)
851
                instance_destroy();
852
            with (interact)
853
                instance_destroy();
854
            instance_destroy();
855
        }
856
    }
857
}