if (!instance_exists(obj_growtangle)) { instance_destroy(); exit; } if (global.inv > 0) { image_speed = 0.25; } else { image_speed = 0; image_index = 0; } var controller = 745; if (hitstop <= 0) { var movespd = 8; if (chargecon == 1) movespd *= 0.8333333333333334; if (canmovevertically) { if (rotatecontrol) { if (up_h()) { with (obj_orangeheart_bullet_orbit) rot_val += 0.1; } if (down_h()) { with (obj_orangeheart_bullet_orbit) rot_val -= 0.1; } } else { if (up_h()) y -= movespd; if (down_h()) y += movespd; } } if (chargecon != 4) { with (obj_debug_orangeheartcontroller) fakecamxspeedbase = fakecamxspeedbase_original; } if (obj_debug_orangeheartcontroller.do_lines == 0.25) y = clamp(y, scr_get_box(1) + 5, scr_get_box(3) - 23); if (obj_debug_orangeheartcontroller.tutorial_clamp) y = clamp(y, scr_get_box(5) - 110, scr_get_box(5) + 90); var _inabox = -4; with (obj_orangeheart_square) { if ((other.x + 20) >= (x + bbox.x1) && other.x <= (x + bbox.x2)) _inabox = id; } if (i_ex(_inabox)) y = clamp(y, _inabox.y + _inabox.bbox.y1 + 3, (_inabox.y + _inabox.bbox.y2) - 21); if (chargecon == 4) y = clamp(y, scr_get_box(5) - 58, scr_get_box(5) + 39); with (obj_heart) { x = other.x; y = other.y; } heartcooldown = scr_approach(heartcooldown, 0, 1); if (chargecon == 0 && !shakeheart && !heartcooldown && cancharge) { if (button1_h()) { chargecon = 1; loop_sound = snd_loop(snd_chargeshot_charge); snd_pitch(loop_sound, 0.25); snd_volume(loop_sound, 0.5, 0); chargetimer = 0; glowtimer = 0; } } if (chargecon == 1) { if (button1_h()) { dashstate = 1; chargetimer = scr_approach(chargetimer, 16, 1); snd_pitch(loop_sound, min(0.5 + (chargetimer * 0.05), 1)); if (controller.scrolling) controller.fakecamxspeedadditional = min(chargetimer, 8) * 0.5; } else { with (obj_orangeheart_bullet) { if (x > (other.x + 20)) { if (variable_instance_exists(id, "i_am_a_glove")) orangeheartControlled = true; } } if (chargetimer == 16) { snd_stop(loop_sound); snd_play(snd_explosion_mmx3, 0.5, 2); chargecon = 2; dashtimer = 0; } else { chargetimer = 8 + (chargetimer * 0.5); snd_stop(loop_sound); snd_play(snd_explosion_mmx3, 0.5, 2); chargecon = 2; dashtimer = 0; } } } if (chargetype == 0) { if (chargecon == 2) { x = basex + ((chargetimer / maxcharge) * chargedistance) + minimumdistance; chargecon = 3; } if (chargecon == 3) { chargetimer = 0; dashtimer++; x = lerp_ease_out(x, basex, dashtimer / 15, 2); if (dashtimer >= 15) { x = basex; chargecon = 0; dashtimer = 0; } } } if (chargetype == 1) { if (chargecon == 2) { dashstate = 2; dashing = 1; if (!controller.scrolling) { with (obj_writer) instance_destroy(); snd_play(snd_explosion_mmx3, 1); sprite_index = spr_orangeheart_white; image_angle = 0; image_blend = c_orange; controller.scrolling = true; controller.fakecamxspeedbase_original = -11; controller.fakecamxspeedbase = -11; canmovevertically = true; drawafterimages = true; with (obj_marker) { if (sprite_index == spr_battlebg_tiny) { image_index = 1; orangeheartControlled = true; if (!instance_exists(obj_darkener)) instance_create(0, 0, obj_darkener); } } } controller.fakecamxspeedadditional = -(2 + chargetimer); chargecon = 3; } if (chargecon == 3) { var dashtarg = 4 + chargetimer; dashtimer++; controller.fakecamxspeedadditional = lerp_ease_out(controller.fakecamxspeedadditional, 0, dashtimer / dashtarg, 0); if (controller.fakecamxspeedadditional >= -1) { heartcooldown = 2; chargetimer = 0; dashstate = 0; controller.fakecamxspeedadditional = 0; chargecon = 0; dashtimer = 0; stopdashbuffer = 4; } } if (chargecon == 4 || chargecon == 5) { } } if (dashstate == 0 || chargecon == 0 || chargecon == 1) { stopdashbuffer--; if (stopdashbuffer <= 0) dashing = 0; } } else { hitstop--; }