Forum

A Series of noob questions part 2 - walking speed and jumpin

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

A Series of noob questions part 2 - walking speed and jumpin

Postby behind_you » Wed Feb 16, 2011 3:09 pm

hey im back! today i'm wondering about jumping height and walking speed. the quake dude jumps too high and runs like a car. i wanna slow him down and lower the total jump height a bit. how can i do that?[/code]
User avatar
behind_you
 
Posts: 237
Joined: Sat Feb 05, 2011 6:57 am
Location: Tripoli, Libya

Postby DusterdooSmock » Wed Feb 16, 2011 6:46 pm

Walking speed can be altered through these commands:
cl_forwardspeed - Sets the forward speed
cl_backspeed - Sets the backward speed
cl_sidespeed - Sets the side speed
sv_maxspeed - Limits all of the speeds

And, as for the jumping, correct me if i'm wrong, but i think you would alter the gravity level...
DusterdooSmock
 
Posts: 170
Joined: Thu Aug 19, 2010 9:58 pm

Postby Lardarse » Wed Feb 16, 2011 11:21 pm

Jump velocity is specified in the QuakeC (player.qc, PlayerPreThink() I believe).
Roaming status: Testing and documentation
User avatar
Lardarse
 
Posts: 266
Joined: Sat Nov 05, 2005 1:58 pm
Location: Bristol, UK

Postby Ghost_Fang » Wed Feb 16, 2011 11:22 pm

In client.qc, "void() PlayerJump =", near the bottom of that function
self.velocity_z = self.velocity_z + 270;
change that for your height
Ghost_Fang
 
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Postby Mexicouger » Wed Feb 16, 2011 11:39 pm

You could also alter the gravity of all the objects in game by going:

Code: Select all
localcmd ("sv_gravity 200\n");


or an individual entity:

Code: Select all
stuffcmd (self, "sv_gravity 200\n");
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Postby Ghost_Fang » Wed Feb 16, 2011 11:49 pm

i think he was looking for a permanent player height jump change
Ghost_Fang
 
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Postby Baker » Thu Feb 17, 2011 12:00 am

client.qc --- see PlayerJump


// player jumping sound
sound (self, CHAN_BODY, "player/plyrjmp8.wav", 1, ATTN_NORM);
self.velocity_z = self.velocity_z + 270;


Adjust 270 to a lower value ... I imagine. I'm not Mr. QuakeC.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby Ghost_Fang » Thu Feb 17, 2011 12:09 am

Yea, your right baker, lower number = smaller jumps.

[offtopic] Baker, you know all this coding knowledge about engine and stuff, but you haven't spent much time in QuakeC? Whats up with that? [/offtopic]
Ghost_Fang
 
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Postby Baker » Thu Feb 17, 2011 12:22 am

Ghost_Fang wrote:[offtopic] Baker, you know all this coding knowledge about engine and stuff, but you haven't spent much time in QuakeC? Whats up with that? [/offtopic]


To get any level of competence with engine coding, you have to put in a ton of hours modifying the code and getting the picture of how everything works.

The same is true for QuakeC and I just haven't spent that kind of hands on time with QuakeC.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby Mexicouger » Thu Feb 17, 2011 12:53 am

Thanks for the advice. It does take time to learn things
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Postby behind_you » Sat Feb 19, 2011 7:09 am

wow it worked! thanks everyone!
User avatar
behind_you
 
Posts: 237
Joined: Sat Feb 05, 2011 6:57 am
Location: Tripoli, Libya


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest