Jumping
Posted: Tue May 10, 2011 3:11 am
I got the character to jump but I do not know how to limit it to one or two jumps. Anyone know how?
//so, put jump turning to 1 on the ground for example.. for when the thing lands.
if(jump==1)
{
//makes the movement
yvelocity=-8;
//makes it so player cant jump for ever
jump=0;
}
//set the jump as suggested above, but instead of 1, however many jumps you want
if(jump>0)
{
yvelocity=-8;
//-- means -1but just looks cooler :D
jump--;
}
rykein wrote:so much for tryin to help.