layer_set_visible("CUTSCENE_ELEMENTS", false); layer_set_visible("NPCs", false); npc_yellow = scr_plat_makeactor_fromasset(findspriteinfo(spr_yellow_walk_right, undefined)); con = 0; npc_key = scr_marker_fromasset(findsprite(spr_fcastle_yellow_key)); npc_glow = instance_create(npc_key.x, npc_key.y + 4, obj_marker_fancy); with (npc_glow) { sprite_index = spr_dw_feather_glow; siner = 0; depth = other.npc_key.depth + 1; image_speed = 0.25; image_alpha = 0.5; step_func = function() { siner += 0.03; image_xscale = 1.75 + (0.25 * sin(siner)); image_yscale = 1.75 + (0.25 * sin(siner + 0.3)); }; } if (global.flag[1454] >= 10) { npc_yellow.visible = 0; npc_key.visible = 0; npc_glow.visible = 0; } hattimer = 0; supershock = false; camy = 0; npc_hat = instance_create(-100, -100, obj_marker_fancy); with (npc_hat) { con = 0; yel = other.npc_yellow; timer = 0; sprite_index = spr_yellow_hat_spin; scr_darksize(); image_speed = 0.25; y = yel.y - 300; step_func = function() { if (con == 1) { timer++; vspeed = min(vspeed + 0.1, 3); var goalx = yel.x + 14; var goaly = yel.y; var amp = abs(y - yel.y) * 0.2; image_speed = 0.25 + (sin(0.15 * timer) * 0.3) + (sin(0.05 * timer) * 0.1); x = (goalx + (amp * sin(timer * 0.08))) - (sin((timer + 0.32) * 0.03) * amp * 1.3); if (y >= (goaly - 40)) { snd_play(snd_item); c_waitcustom_end(); with (yel) { force_animation(106); x += 3; } instance_destroy(); } } }; } gallopsnd = -4; dark_overlay = -4; npc_yellow.visible = 0; flower_ruined = 0; destroy_guns = function() { with (obj_plat_enm_gun) { hit = 1; hp = 0; instance_destroy(); } audio_stop_sound(snd_punchweak); snd_play(snd_punchweak); }; makeguns = function() { for (var i = 0; i < 6; i++) { var gm = scr_genmarker("gun" + string(i + 1)); if (gm != -4) { scr_script_delayed(function(arg0, arg1) { var gun = instance_create(arg0.x, arg0.y + random_range(80, 100), obj_flower_spawner); with (gun) { obj_index = 376; _memory.targetindex = floor(arg1 / 2); _memory.aiming = true; _memory.generated = true; _memory.catchup_lerp = 1; _memory.shotdelay_start = -1; _memory.volleys = [[3]]; } }, 1 + (2 * i), gm, i); } } };