if (!init) { center.x = xstart; center.y = ystart; if (target != -4) { offset.x = (target.x - target.sprite_xoffset) + (target.sprite_width / 2); offset.y = (target.y - target.sprite_yoffset) + target.sprite_height; } init = true; if (style == 1) { sprite_index = choose(spr_bush_leaf_pink, spr_bush_leaf2_pink, spr_bush_leaf3_pink); scr_darksize(); } start_depth = depth; } if (target != -4) { center.x = target.x; center.y = target.y; } var _str = 1; var has_owner = instance_exists(owner); if (has_owner) _str = owner.strength; x = (center.x + offset.x) - (sin(siner / 8) * ((distance + start_distance + (_str * 5)) - 1)); var _yner = cos(siner / 8); if (_yner > 0) depth = start_depth + 1; else depth = start_depth - 1; var _ys = 1; if (has_owner) _ys = 1 - owner.ys[0]; y = center.y + ((offset.y + (_yner * (distance + start_distance) * 0.5)) * _ys); if (start_distance > 0) start_distance -= 5; if (downward) height -= (floor(_str) + str_mod); else height += floor(_str); var col = 32768; if (style == 1) col = 16711935; if (_yner < 0) { image_xscale = 1.75; image_yscale = 1.75; } else { image_xscale = 2; image_yscale = 2; } image_blend = merge_color(c_white, c_gray, clamp01(-_yner)); str_mod += 0.05; distance += 0.25; siner += (0.5 + (_str / 2)); cosiner++; lifetime--; if (lifetime <= 0) { image_alpha -= 0.1; if (image_alpha <= 0) instance_destroy(); } else if (image_alpha < 1) { image_alpha = min(image_alpha + 0.25, 1); }