layer_set_visible("NPCs", 0); layer_set_visible("DEBUG_ASSETS", 0); layer_set_visible("Water_Teaparty", 0); con = 0; timer = 0; init = 0; leafpileflag = 1384; teabit = 15; blocking_leaf_pile_index = 0; bits_that_make_chest_appearable = [1, 2, 3, 4]; global.pre_hospital_room = 133; global.pre_hospital_entrance = 1; netskie_encounterflag = 1485; for (var i = 1; i <= 8; i++) { rocks[i] = instance_create(0, 0, obj_rock3d); var fox = instance_create(x, y, obj_dw_garden_secretfox); fox.assign_target(rocks[i]); } add_bottom_chest = function() { var could_spawn = false; for (var i = 0; i < array_length(bits_that_make_chest_appearable); i++) { if (scr_get_bitmask_value(global.flag[leafpileflag], bits_that_make_chest_appearable[i], 1) == 1) { could_spawn = true; break; } } if (!could_spawn) exit; if (scr_get_bitmask_value(global.flag[leafpileflag], blocking_leaf_pile_index, 1) == 0) exit; con = 1; var treasure_has_tail = false; if (global.flag[netskie_encounterflag] > 1) { con = 2.1; treasure_has_tail = true; } var ne_flag = netskie_encounterflag; with (scr_genmarker("netskie")) { with (instance_create(x, y, obj_treasure_fox)) { scr_darksize(); has_tail = treasure_has_tail; encounterflag = ne_flag; } } }; show_water_teaparty = function() { var lay = layer_get_id("Water_Teaparty"); if (!layer_get_visible(lay)) { layer_set_visible(lay, true); var flora = scr_makenpc_fromasset(findsprite(spr_enemy_floradin_spared_water, "Water_Teaparty", c_red)); flora.marker.image_blend = c_white; flora.issolid = false; scr_setnpclogic(flora, {}, function(arg0) { if (arg0) { scr_speaker("no_name"); msgsetloc(0, "* It's been so long since I last turned into a prune.../", "obj_dw_garden_newdash_slash_Create_0_gml_55_0"); msgnextloc("* (talking to wrinkled fingers) what's new guys..^1. haha/%", "obj_dw_garden_newdash_slash_Create_0_gml_56_0"); } else { scr_speaker("no_name"); msgsetloc(0, "* Thank you for freeing us./", "obj_dw_garden_newdash_slash_Create_0_gml_59_0"); msgnextloc("* We were stuck between those two dash gates for so long./", "obj_dw_garden_newdash_slash_Create_0_gml_60_0"); msgnextloc("* It's so much better being in the water./", "obj_dw_garden_newdash_slash_Create_0_gml_61_0"); msgnextloc("* It's wet and we like it./%", "obj_dw_garden_newdash_slash_Create_0_gml_62_0"); } }); } }; if (scr_get_bitmask_value(global.flag[leafpileflag], teabit, 1) == 1) { show_water_teaparty(); con = 5; layer_set_visible(layer_get_id("Teaparty"), false); } knock_away = function(arg0, arg1) { global.interact = 1; alarm[0] = 3; show_water_teaparty(); global.flag[leafpileflag] = scr_set_bitmask_value(global.flag[leafpileflag], teabit, 1, 1); if (layer_get_element_type(arg1) == 4) { var _x = layer_sprite_get_x(arg1); var _y = layer_sprite_get_y(arg1); var _spr = layer_sprite_get_sprite(arg1); with (instance_create(_x, _y, obj_marker_fancy)) { depth = layer_get_depth(arg0); sprite_index = _spr; image_index = layer_sprite_get_index(arg1); scr_darksize(); hspeed = random_range(18, 24); friction = 0.3; gravity = 1; vspeed = random_range(-16, -12); image_angle = layer_sprite_get_angle(arg1); rotation_speed = random_range(16, 24); offx = (sprite_get_width(sprite_index) * 0.5) - sprite_get_xoffset(sprite_index); offy = (sprite_get_height(sprite_index) * 0.5) - sprite_get_yoffset(sprite_index); xsub = lengthdir_x(offx * 2, image_angle); ysub = lengthdir_y(offy * 2, image_angle); x -= xsub; y -= ysub; scr_doom(self, 180); step_func = function() { x += xsub; y += ysub; image_angle += rotation_speed; xsub = lengthdir_x(offx * 2, image_angle); ysub = lengthdir_y(offy * 2, image_angle); x -= xsub; y -= ysub; }; } layer_sprite_destroy(arg1); } }; if (global.plot >= 300) { npc_flora_blocker = scr_makenpc_fromasset(findsprite(spr_enemy_floradin, "NPCs", c_red)); npc_flora_blocker.marker.image_blend = c_white; scr_setnpclogic(npc_flora_blocker, { animspeed: 0.25 }, function(arg0) { if (arg0) { scr_speaker("no_name"); msgsetloc(0, "* I want to be part of a dangerous accident first^1!\nWait your turn!/%", "obj_dw_garden_newdash_slash_Create_0_gml_126_0"); } else { scr_speaker("no_name"); msgsetloc(0, "* This area is closed due to dangerous dashing accidents!/", "obj_dw_garden_newdash_slash_Create_0_gml_129_0"); msgnextloc("* If you want to return to CLIFFs^1, go through the top left of DINER!/%", "obj_dw_garden_newdash_slash_Create_0_gml_130_0"); } }); }