Adagar, thanks for the responses.
I'm trying to do an action platformer. My player is a ninja, and his attack is a swing of his sword. What I'm trying to do is for him to jump in the direction he's facing/running when the attack button is pressed.
So when he's running forward, the attack will leap him forward 200 pixels in 0.2 seconds, inflicting damage to everything in his path.
Later (When I figure how to implement the previous part), when he jumps, and hits the attack button, he will jump 200 pixels in 0.2 seconds in 45 or 90 degrees (inflicting damage to everything in his path).
And later still, he will be able to do that in mid air (so he can dash in any angle including down; in a double-jump fashion.)