How do I make the player "wait" to be able to move until he touches the ground after doing his smash attack ? This is what I got so far but it does not work
-
if Input.is_action_just_pressed("jump"): if is_on_floor(): velocity.y = jump_velocity elif not has_smashed: moving=false velocity.x=0 velocity.y = -jump_velocity*2 has_smashed=true
if moving==true: var direction = Input.get_axis("left", "right") if direction: velocity.x = direction * speed else: velocity.x = move_toward(velocity.x, 0, speed) else: await is_on_floor() moving=true