oo = 0; if (spec < 2) blocktimer += 1; shrink_current++; if (growsound != -4) { if (can_shrink && image_xscale == xscale_start && image_yscale == yscale_start) { snd_volume(growsound, 0, 1); } else if (can_shrink && shrink_current > shrinkdelay) { x = lerp(xstart, xstart - (sprite_get_width(sprite_index) * 0.5), image_xscale); y = lerp(ystart, ystart - (sprite_get_height(sprite_index) * 0.75), image_yscale); image_xscale = scr_approach(image_xscale, xscale_start, 0.01); image_yscale = scr_approach(image_yscale, yscale_start, 0.01); snd_pitch(growsound, image_xscale / 2); var target = 1198; if (!i_ex(target)) target = 910; if (!i_ex(target)) target = 1660; if (i_ex(target)) snd_volume(growsound, 1 - inverselerp(0, 1000, point_distance(x, y, target.x, target.y)), 1); } else if (can_shrink && shrink_current >= 2) { snd_pitch(growsound, image_xscale / 2); snd_volume(growsound, 0, 1); } } blocktimer = 0; if (blocktimer == 20) { xv = x + (sprite_width / 4) + random(sprite_width / 2); yv = y + (sprite_height / 4) + random(sprite_height / 4); block = scr_dark_marker(xv, yv, spr_blocktree_block_pink); with (block) { hspeed = (0.4 + random(1)) * (other.leaf_dir * -1); vspeed = 0.7 + random(1.5); gravity_direction = other.leaf_dir ? 180 : 0; gravity = 0.1; image_alpha = 0; friction = -0.1; } block.depth = depth - 1; block.image_blend = merge_color(c_white, c_black, oo); if (oo >= 0.8) { with (block) instance_destroy(); } } if (blocktimer >= 20 && blocktimer <= 30) { with (block) { if (image_alpha < 1) image_alpha += 0.2; } } if (blocktimer >= 38) { with (block) image_alpha -= 0.1; } if (blocktimer >= 48) { blocktimer = 0; with (block) instance_destroy(); }