Answered Does anyone know the script to change jump height?

jcal147

Veteran
Messages
63
Reaction score
12
Points
793
I am in need of a script to change the jump height value. Any help would be most appreciated.
 

DewyMODS

Hello :D
Messages
24
Reaction score
6
Points
793
This can enable super jump

Code:
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;
    }
}
 

jcal147

Veteran
Messages
63
Reaction score
12
Points
793
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);
}
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
5,093
Reaction score
2,881
Points
1,103
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);
}
You can change the value of the function here:
Code:
self setVelocity(self getVelocity()+(0, 0, 999)); //The 999 is the value
jump_height can't set via gsc so you can not use the dvar like bg_gravity!
 

jcal147

Veteran
Messages
63
Reaction score
12
Points
793
I never planned on using the dvar bg_gravity, I was just hoping I could do a similar style with the values, and what not.
 
Top