if (global.turntimer <= 5) { if (!im_done) { im_done = true; with (obj_attack_knifechain_manager2) { alarm[0] = -1; alarm[1] = -1; alarm[2] = -1; } if (!audio_is_playing(snd_jump)) snd_play_x(snd_jump, 0.5, 2); snd_stop(snd_swing); image_speed = 0; image_index = 0; sprite_index = spr_enemy_aqua_spin; scr_lerpvar("image_index", 2, 12, 18, 2, "out"); for (var a = 0; a < ds_list_size(knife_list); a++) { var cur_knife = ds_list_find_value(knife_list, a); var lastknife = -1; with (cur_knife) { var timescale = clamp(floor((15 / ds_list_size(other.knife_list)) * a), 1, 15); with (instance_create(x, y, obj_marker)) { if (lastknife != -1) senpai = lastknife; else senpai = -1; lastknife = id; sprite_index = spr_attack_knifechain_spin; image_index = other.image_index; image_speed = other.image_speed; depth = other.depth; image_angle = 0; image_xscale = other.image_xscale; image_yscale = other.image_yscale; myscale = timescale; counter = 1; my_manager = 974; if (i_ex(senpai)) distance = point_distance(senpai.x, senpai.y, x, y); else distance = point_distance(my_manager.x + 20, my_manager.y + 71, x, y); if (i_ex(senpai)) angle = point_direction(senpai.x, senpai.y, x, y); else angle = point_direction(obj_attack_knifechain_manager2.x + 20, obj_attack_knifechain_manager2.y + 71, x, y); scr_script_delayed(instance_destroy, timescale); funct = function() { counter = scr_approach(counter, 0, 1 / myscale); if (i_ex(senpai)) { x = senpai.x + lengthdir_x(distance * counter, angle); y = senpai.y + lengthdir_y(distance * counter, angle); angle = point_direction(senpai.x, senpai.y, x, y); } else { x = my_manager.x + 20 + lengthdir_x(distance * counter, angle); y = my_manager.y + 71 + lengthdir_y(distance * counter, angle); angle = point_direction(obj_attack_knifechain_manager2.x + 20, obj_attack_knifechain_manager2.y + 71, x, y); } }; scr_script_repeat(scr_use_funct, 15, 1); } instance_destroy(); } } scr_lerpvar("x", x, obj_aqua_enemy.x, 20); scr_lerpvar("y", y, obj_aqua_enemy.y - 60, 10, 2, "out"); scr_script_delayed(scr_lerpvar, 10, "y", obj_aqua_enemy.y - 60, obj_aqua_enemy.y - 29, 10, 2, "in"); scr_script_delayed(instance_destroy, 20); } exit; } knife_x = x + 3 + 17; knife_y = ((y + 40) - 29) + 60; knife_direction = scr_approach(knife_direction, knife_direction_goal, min(abs(knife_direction_goal - knife_direction) * 0.15, knife_change_max)); for (var a = 0; a < ds_list_size(knife_list); a++) { var cur_knife = ds_list_find_value(knife_list, a); with (cur_knife) { if (a == 0) { knife_angle = other.knife_direction; } else { var prev_knife_angle = ds_list_find_value(other.knife_list, a - 1).knife_angle + (side * a * 0.5); knife_angle = scr_approach(knife_angle, prev_knife_angle, min(abs(prev_knife_angle - knife_angle) * other.knife_arc, other.knife_change_max)); } knife_distance = scr_approach(knife_distance, knife_distance_goal, abs(knife_distance_goal - knife_distance) * 0.15); image_angle = knife_angle - (90 * side); x = other.knife_x + lengthdir_x(knife_distance, knife_angle); y = other.knife_y + lengthdir_y(knife_distance, knife_angle); } }