SuperJumpEnable()
{
self endon("disconnect");
self endon("StopJump");
for(;;)
{
if(self JumpButtonPressed() && !isDefined(self.allowedtopress))
{
for(i = 0; i < 10; i++)
{
self.allowedtopress = true;
self setVelocity(self getVelocity()+(0, 0, 999));
wait 0.05;
}
self.allowedtopress = undefined;
}
wait 0.05;
}
}
You can change the value of the function here:Thank you, but the problem with that is I want to be able to change the values of the jump height. Like this.
self MainMenu(">Gravity", ">Movement Options");
self MenuOption(">Gravity",0,"Gravity set to 1200",::toggleGravity, 1200);
self MenuOption(">Gravity",1,"Gravity set to 1000",::toggleGravity, 1000);
self MenuOption(">Gravity",2,"Gravity set to Default",::toggleGravity, 800);
self MenuOption(">Gravity",3,"Gravity set to 600",::toggleGravity, 600);
self MenuOption(">Gravity",4,"Gravity set to 400",::toggleGravity, 400);
self MenuOption(">Gravity",5,"Gravity set to 200",::toggleGravity, 200);
self MenuOption(">Gravity",6,"Gravity set to 100",::toggleGravity, 100);
toggleGravity(value)
{
setDvar("bg_gravity", value );
iprintln("Gravity changed to " + value);
}
self setVelocity(self getVelocity()+(0, 0, 999)); //The 999 is the value