There are a lot of character Jumping Scripts on the forum lately, I figured I would add the one I have spent the evening working on.
In the declaration section of the script add the int for "Jumping" and floats for the timers. OBJ 44 is the velocity object.. I set mine to about 18 for the character with decent results. If you need more power than that in your Jumps, you should extend the jumpTimer3 Limit on the last line out accordingly to prevent super jumping...
Enjoy!
In the declaration section of the script add the int for "Jumping" and floats for the timers. OBJ 44 is the velocity object.. I set mine to about 18 for the character with decent results. If you need more power than that in your Jumps, you should extend the jumpTimer3 Limit on the last line out accordingly to prevent super jumping...
Enjoy!
Code: [Select]
if (iKeyDown(iKeyCode("DIK_SPACE"))&&jumpTimer<=0.01)
{Jumping=1;
jumpTimer+=0.016667;
jumpTimer3=0;
}
if (Jumping==1&&jumpTimer>=0.01){iObjectStart(OBJ_44); Jumping=0;jumpTimer2+=0.016667;}
if (jumpTimer2>=0.01) jumpTimer3+=0.016667;
if (jumpTimer3>=2){ jumpTimer=0; jumpTimer2=0; }