Tutorial: Quake World Style Jumping
Moderator: InsideQC Admins
3 posts
• Page 1 of 1
Tutorial: Quake World Style Jumping
Hello.
Credit for this tutorial goes to Electro.
Step One.
Open up Client.qc
Create a float client.qc at the top
Call it:
This will be for when people are in the air and press jump.
While people are in the air, and press jump, we set it to TRUE. Then when they land, if they're on the ground and have this flag set to TRUE, then we make it execute the jump.
So next up is to make it set to TRUE if you press jump while in the air.
Find Player Jump in Client.qc and scroll down until you find this:
Change it to be this:
Below, where it does:
Add this right after it:
Still in Player Jump.
Add this:
Now, we want to make it so it jumps if they have jump_remember TRUE, or button2 pressed.
In PlayerPreThink find this:
Change it to:
That is all there is too it.
Credit for this tutorial goes to Electro.
Step One.
Open up Client.qc
Create a float client.qc at the top
Call it:
- Code: Select all
.float jump_remember;
This will be for when people are in the air and press jump.
While people are in the air, and press jump, we set it to TRUE. Then when they land, if they're on the ground and have this flag set to TRUE, then we make it execute the jump.
So next up is to make it set to TRUE if you press jump while in the air.
Find Player Jump in Client.qc and scroll down until you find this:
- Code: Select all
if (!(self.flags & FL_ONGROUND))
return;
Change it to be this:
- Code: Select all
if (!(self.flags & FL_ONGROUND))
{
self.jump_remember = TRUE;
return;
}
Below, where it does:
- Code: Select all
self.button2 = 0;
Add this right after it:
- Code: Select all
self.jump_remember = FALSE;
Still in Player Jump.
Add this:
- Code: Select all
self.velocity = v_forward + (self.velocity * 1.05);//small push when jumping
self.velocity = v_right + (self.velocity * 1.05);//small push when jumping
Now, we want to make it so it jumps if they have jump_remember TRUE, or button2 pressed.
In PlayerPreThink find this:
- Code: Select all
if (self.button2)
Change it to:
- Code: Select all
if ( (self.button2) || (self.jump_remember) )
That is all there is too it.
Last edited by Team Xlink on Thu Aug 27, 2009 4:27 am, edited 1 time in total.
- Team Xlink
- Posts: 368
- Joined: Thu Jun 25, 2009 4:45 am
- Location: Michigan
in PlayerJump i've used this near the end..
seems to work well for me...
Oh wait, jump, press jump again in netquake and hold will make u jump when u land... i thought u meant mimicing QW strafe jumping for netQuake
- Code: Select all
self.velocity = v_forward + (self.velocity * 1.05);//small push when jumping
self.velocity = v_right + (self.velocity * 1.05);//small push when jumping
seems to work well for me...
Oh wait, jump, press jump again in netquake and hold will make u jump when u land... i thought u meant mimicing QW strafe jumping for netQuake
- r00k
- Posts: 1110
- Joined: Sat Nov 13, 2004 10:39 pm
Yeah, that is the goal of this tutorial, it seems that I forgot the part that increases your velocity, so I added that part now, thank you r00k.
- Team Xlink
- Posts: 368
- Joined: Thu Jun 25, 2009 4:45 am
- Location: Michigan
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest