Hi all,
Today I’ve got another problem:
I’d like to do a double dash in mid air
if (Input.GetKey(KeyCode.RightArrow)) {
transform.Translate(Vector3(1, 0, 0) * Time.deltaTime * walkspeed);
if (Input.GetKeyDown("x") && sprintcount == 0 && grounded == false) {
transform.Translate(Vector3(5,0,0));
sprintcount +=1;
}
}
This is my code. It just moves right, and if I press x mid air it does a dash, but I’d like to do that when I press twice the right key mid air does the dash, and after the dash if I press right key twice again it does the dash again, how can I do that?