oo = 0; if (spec < 2) blocktimer += 1; shrink_current++; var scale = scr_platswap_yscale(); if (scale[0] == 1) { frontmarker1.depth = 1501; frontmarker2.depth = 1500; } platform.y = y + 80; 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); } } if (scr_plat_standing_on("kr", platform)) { var ws = was_standing; was_standing = true; if (!ws) { for (var i = 0; i < 15; i++) { var xx = x + (sprite_width / 4) + random(sprite_width / 2); var yy = y + (sprite_height / 2.5) + random(sprite_height / 8); var mm = scr_dark_marker(xx, yy, spr_blocktree_block_pink); with (mm) { depth = other.depth - 1; hspeed = (0.1 + random(0.2)) * (other.leaf_dir * -1); vspeed = 2.7 + random(1.5); gravity_direction = other.leaf_dir ? 225 : 315; gravity = 0.1; image_alpha = 0; friction = -0.1; scr_lerpvar("image_alpha", 1, 0, 60); scr_doom(self, 60); scr_lerpvar("vspeed", vspeed, 0, 60); } } } else if (abs(obj_plat_player.hspeed) > 1 && (blocktimer % 4) == 0) { var xx = x + (sprite_width / 4) + random(sprite_width / 2); var yy = y + (sprite_height / 2.5) + random(sprite_height / 8); siner += 10; var mm = scr_dark_marker(xx, yy, spr_blocktree_block_pink); with (mm) { depth = other.depth - 1; hspeed = (0.1 + random(0.2)) * (other.leaf_dir * -1); vspeed = 2.7 + random(1.5); gravity_direction = other.leaf_dir ? 225 : 315; gravity = 0.1; image_alpha = 0; friction = -0.1; scr_lerpvar("image_alpha", 1, 0, 60); scr_doom(self, 60); scr_lerpvar("vspeed", vspeed, 0, 60); } } } else { was_standing = false; } 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(); }