W
Waffliple
Guest
Hello! I've been searching quite a bit for a situation like this but I still can't seem to figure this out.
What I've trying to accomplish is a short range dash towards the mouse in a 2D platformer. I've been able to pull off a short blink with a maximum range of 300 towards the mouse which was great but I really want to see it be a smooth movement rather than a quick teleport. The closest I've gotten has been with move_point_direction but using it with keyboard_check_pressed would only move me one instance of the speed value in the move_point_direction.
this is what i have regarding the dash at the moment, with key_dash being keyboard_check_pressed shift. am i going in the complete wrong direction or am i missing something really minor?
What I've trying to accomplish is a short range dash towards the mouse in a 2D platformer. I've been able to pull off a short blink with a maximum range of 300 towards the mouse which was great but I really want to see it be a smooth movement rather than a quick teleport. The closest I've gotten has been with move_point_direction but using it with keyboard_check_pressed would only move me one instance of the speed value in the move_point_direction.
Code:
if (key_dash) && dash = 0 {
move_towards_point(mouse_x,mouse_y,20)
dash = 1;
alarm[0] = room_speed
}
else speed =0;