hey guys , i want a double jump to this script , i removed if (IsGrounded()) for unilimited jumps , but me all i want is just 2 jumps , how could i modify this script please , btw im using the default third person character controller from unity , thanks !
function ApplyJumping ()
{
// Prevent jumping too fast after each other
if (lastJumpTime + jumpRepeatTime > Time.time)
return;
if (IsGrounded()) {
// Jump
// - Only when pressing the button down
// - With a timeout so you can press the button slightly before landing
if (canJump && Time.time < lastJumpButtonTime + jumpTimeout) {
verticalSpeed = CalculateJumpVerticalSpeed (jumpHeight);
SendMessage("DidJump", SendMessageOptions.DontRequireReceiver);
}
}
}
dude please can u edit it for me im a quit noob a coding please help , here's the whole script : http://sharetext.org/6i9Z
– Maisonadam1994