if (!init) init = true; distance = lerp(100, 30, 1 - scr_ease_in(lifetime / max_lifetime, 2)); var _psuedo_depth = 0; if (lifetime > 0) { x = xstart + lengthdir_x(distance, direction); _psuedo_depth = lengthdir_y(distance, direction); if (draw_foreground) { if (_psuedo_depth > ystart) foreground = true; else foreground = false; } y = (ystart + (_psuedo_depth * 0.5)) - height; var _prog = 1 - (lifetime / start_lifetime); height = 100 - (200 * scr_ease_in(_prog, 3)); fall_speed += 0.05; if (rising) y -= (scr_ease_in(1 - ((lifetime - rise_start) / max_lifetime), 3) * 500); direction -= 10; } var _length = array_length(points); with (obj_wind_trail_point) { if (owner == other.id) { life -= (1 / other.child_lifetime); if (life < 0) { array_resize(other.points, _length - 1); instance_destroy(); } } } if (lifetime > 0) { if (!created) { xlast = x; ylast = y; } if (y > (owner.y + 20)) y = owner.y + 20; timer++; var _point = instance_create(xlast, ylast, obj_wind_trail_point); _point.owner = id; _point.life = 1 - (1 / child_lifetime); _point.depth = depth; if (foreground_effect && foreground) _point.foreground = true; if (!created) { _point.direction = point_direction(xlast, ylast, x, y); created = true; } else { _point.direction = scr_angle_lerp(point_direction(_point.x, _point.y, x, y), point_direction(lastpoint.x, lastpoint.y, _point.x, _point.y), 0.5); } _point.sidex = lengthdir_x(1, _point.direction + 90); _point.sidey = lengthdir_y(1, _point.direction + 90); lastpoint = _point; array_insert(points, 0, _point); } lifetime--; ylast = y; xlast = x; if (lifetime <= (0 - child_lifetime)) instance_destroy();