if (wall_destroy == 1) { if (x < (camerax() - 80) || x > (camerax() + 640 + 80) || y < (cameray() - 80) || y > (cameray() + 480 + 80)) instance_destroy(); } if (updateimageangle == 1) image_angle = direction; if (spin == 1) image_angle += spinspeed; if (bottomfade != 0) { if (y > (cameray() + bottomfade)) image_alpha *= 0.8; } lifetime++; if (lifetime >= maxlifetime || !i_ex(obj_heart)) instance_destroy(); if (i_ex(obj_orange_green_controller) && i_ex(obj_heart) && obj_orange_green_controller.treasurehunter && distance_to_object(obj_heart) < 30) { var _direction = point_direction(x, y, obj_heart.x + 10, obj_heart.y + 10); x += lengthdir_x(6, _direction); y += lengthdir_y(6, _direction); } if (sprite_index == spr_donut_bullet) { if (con == 0) x -= donut_speed; if (con == 1) x += donut_speed; if (x < (obj_growtangle.x - (obj_growtangle.sprite_width * 0.25)) && vspeed > 0) { x = obj_growtangle.x - (obj_growtangle.sprite_width * 0.25); con = 1; snd_stop(snd_petaldrain); snd_play(snd_petaldrain); } if (x > (obj_growtangle.x + (obj_growtangle.sprite_width * 0.45)) && y > (obj_growtangle.y - (obj_growtangle.sprite_height * 0.5)) && vspeed > 0) { x = obj_growtangle.x + (obj_growtangle.sprite_width * 0.45) + 4; con = 0; snd_stop(snd_petaldrain); snd_play(snd_petaldrain); } vspeed += donut_gravity; if (vspeed > 8) speed = 8; } var _repeat = 1; var _afterimage_timer = 0; if (sprite_index == spr_swatchling_platter_candy) { _repeat = 40; timer++; if (timer == 1) speed = 0; if (timer >= 5) image_angle = lerp(image_angle, 90, 0.4); if (timer == 10) snd_play(snd_bell_bounce_short); if (timer >= 10 && timer <= 15) telegraph_alpha += 0.2; if (timer >= 15 && timer <= 20) telegraph_alpha -= 0.2; if (timer == 25) snd_play(snd_bomb, 1, 1.3); if (timer == 80) instance_destroy(); } if (timer >= 25 || sprite_index != spr_swatchling_platter_candy) { repeat (_repeat) { if (sprite_index == spr_swatchling_platter_candy) y += 1; if (_afterimage_timer == 10 || _afterimage_timer == 20 || _afterimage_timer == 30) scr_afterimage(); if (place_meeting(x, y, obj_heart) && image_alpha > 0) { if (sprite_index == spr_swatchling_platter_candy) { y -= 40; scr_tensionheal(7); } if (sprite_index == spr_donut_bullet) { y -= 40; scr_tensionheal(4); } snd_play(snd_power); var _hp_1 = 0; var _hp_2 = 0; var _hp_3 = 0; if (global.hp[1] <= 0) { global.hp[1] = 0; _hp_1 = 1; } if (global.hp[2] <= 0) { global.hp[2] = 0; _hp_2 = 1; } if (global.hp[3] <= 0) { global.hp[3] = 0; _hp_3 = 1; } scr_healall(1); if (_hp_1 == 1) global.hp[1] = 1; if (_hp_2 == 1) global.hp[2] = 1; if (_hp_3 == 1) global.hp[3] = 1; with (obj_heroparent) { scr_tensionheal(4); ha = instance_create(x, y, obj_healanim); ha.target = id; var _alreadyexists = false; for (var i = 0; i < instance_number(obj_dmgwriter); i++) { dmgwriter[i] = instance_find(obj_dmgwriter, i); if (dmgwriter[i].creatorid == id) { dmgwriter[i].damage += 1; dmgwriter[i].init = 0; dmgwriter[i].killtimer = -40; if (global.hp[global.char[myself]] >= global.maxhp[global.char[myself]]) dmgwriter[i].specialmessage = 3; _alreadyexists = true; } } if (_alreadyexists == false) { dmgwr = instance_create(x, ((y - 40) + myheight) - 24, obj_dmgwriter); healstackwriter = dmgwr; with (dmgwr) { delay = 8; type = 3; damage = 1; typeb = 1; creatorid = other.id; } if (global.hp[global.char[myself]] >= global.maxhp[global.char[myself]]) dmgwr.specialmessage = 3; tu += 1; } } if (sprite_index == spr_swatchling_platter_candy) { inst = instance_create(x, y + 40, obj_marker); inst.sprite_index = spr_swatchling_platter_candy; inst.image_angle = image_angle; inst.image_xscale = image_xscale; inst.image_yscale = image_yscale; with (inst) scr_doom(self, 1); } instance_destroy(); break; } } } if (place_meeting(x, y, obj_regularbullet) && i_ex(obj_attack_green_cookingtime) && sprite_index == spr_bullet_green_egg) { var _inst = instance_place(x, y, obj_regularbullet); if (con == 0) x += 6; if (con == 1) { if (_inst.x < x) x += 6; if (_inst.x > x) x -= 6; } if (con == 2) x -= 6; }