if (_paused) exit; if (_state == 0) { _timer++; if (_timer == 1) { _alt++; image_index = ((_alt % 2) == 1) ? 0 : 1; var _direction = point_direction(x, y, _x_target, _y_target); var target_x = x + (lengthdir_x(_x_target, _direction) / 6); if (target_x >= _x_target) target_x = _x_target; var target_y = y + (lengthdir_y(_y_target, _direction) / 6); if (target_y >= _y_target) target_y = _y_target; scr_lerpvar("x", x, target_x, 12, 2, "out"); scr_lerpvar("y", y, target_y, 12, 2, "out"); snd_play_x(snd_wing, 0.7, 1); _xx = x; _yy = y; _shake = true; shakeamt = 5; shakereduct = 0.8; on = 1; } if (_shake) { shakeamt -= shakereduct; on *= -1; _xx = x + (shakeamt * on); _yy = y; if (shakeamt <= 0) { _shake = false; _xx = x; } } if (_timer == 60) _timer = 0; if (_timer >= 13 && x >= _x_target && y >= _y_target) { _state = 1; scr_var_delay("_state", 2, 30); _alt = 0; x = _x_target; y = _y_target; _xx = x; _yy = y; } }