Inside3D!
     

Needs help about dodging qc

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
shadowtails



Joined: 30 Jul 2006
Posts: 11

PostPosted: Sun Jul 30, 2006 7:19 am    Post subject: Needs help about dodging qc Reply with quote

Hello evyrybody.
Can anybody help me how can i make dodging like UT for Q1 please?
I have this code

void() PlayerDodgingLeft =
{
local vector start, end;

if (self.flags & FL_WATERJUMP)
return;

if (self.waterlevel >= 2)
{
if (self.watertype == CONTENT_WATER)
self.velocity_z = 100;
else if (self.watertype == CONTENT_SLIME)
self.velocity_z = 80;
else
self.velocity_z = 50;

// play swiming sound
if (self.swim_flag < time)
{
self.swim_flag = time + 1;
if (random() < 0.5)
sound (self, CHAN_BODY, "misc/water1.wav", 1, ATTN_NORM);
else
sound (self, CHAN_BODY, "misc/water2.wav", 1, ATTN_NORM);
}

return;
}

if (!(self.flags & FL_ONGROUND))
return;

if ( !(self.flags & FL_JUMPRELEASED) )
return; // don't pogo stick

self.flags = self.flags - (self.flags & FL_JUMPRELEASED);

self.flags = self.flags - FL_ONGROUND; // don't stairwalk

self.button2 + self.button2 = self.button2 + self.button2;
// player jumping sound
sound (self, CHAN_BODY, "player/plyrjmp8.wav", 1, ATTN_NORM);
self.velocity_z = self.velocity_z + 170;
self.velocity_y = self.velocity_y + 450;
};

and it works but i don not known how can i make twice button like in UT.
Can anybody help and post instruction how can i make it please?
Back to top
View user's profile Send private message Visit poster's website
FrikaC
Site Admin


Joined: 08 Oct 2004
Posts: 947

PostPosted: Sun Jul 30, 2006 3:45 pm    Post subject: Reply with quote

Define "twice button".
Back to top
View user's profile Send private message Send e-mail
Quake Matt



Joined: 05 Jun 2005
Posts: 129

PostPosted: Sun Jul 30, 2006 3:52 pm    Post subject: Reply with quote

Twice button = double-tap?

It's tricky, since standard Quake engines handle player movement independently of QuakeC, so you can't easily read cursor/WASD presses. Last time I needed something like this, I completely hi-jacked the player's velocity and derived the key presses from that, but that was for an overhead camera, not an FPS game.

Personally, I'd recommend adding a completely new dodge key, much like the existing jump key. You could then compare the player's velocity from the previous frame with the current frame to see which direction he wants to dodge in.

Although, really, I only say this because I never liked having to double-tap to dodge!
Back to top
View user's profile Send private message
scar3crow
Inside3D Staff


Joined: 18 Jan 2005
Posts: 837
Location: Las Vegas, NV

PostPosted: Sun Jul 30, 2006 9:43 pm    Post subject: Reply with quote

Its not a typical dodge, in the Unreal games double tapping a directional indicator causes you to lunge a short distance in that direction, more horizontal than vertical in its movement and very sudden. It is put to quite a bit of use in UT2k3 as you can use it in conjunction with wall jumps to move about in an interesting fashion.

Be kinda neat to see it in Quake perhaps.
Back to top
View user's profile Send private message AIM Address
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Sun Jul 30, 2006 10:40 pm    Post subject: Reply with quote

I agree with QuakeMatt. I've never gotten used to dodging in the unreal games - it's always ended up killing me (e.g.when doing some keypresses to finely adjust my position on a ledge) rather than me actually using it when I need to dodge. Having new buttons for dodge (e.g. Q and E) sounds like a much better idea.

And scar3crow, I've never figured out walljumping in UT2k4. I think I've accidetnally done it once (out of a *lot* of playing), but I don't know how to do it deliberately.
_________________
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Back to top
View user's profile Send private message
scar3crow
Inside3D Staff


Joined: 18 Jan 2005
Posts: 837
Location: Las Vegas, NV

PostPosted: Sun Jul 30, 2006 11:26 pm    Post subject: Reply with quote

Oh yeah it can screw one up, just look at Peak Monastery in UT. Im fine with it being separate keys as well.

Walljumping in UT2k3 is easy once you get used to it. Im not an acrobat like some people are by any means, but you can get around a lot easier - especially in conjunction with jumping at the apex of a plat lift (Ive launched myself off of the tips of trees across maps before with it). Basically double jump at a wall and Dodge Jump away from it, if youre close enough the game will consider the wall a valid "floor" from which to dodge.
Back to top
View user's profile Send private message AIM Address
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Mon Jul 31, 2006 5:31 am    Post subject: Reply with quote

Oh. I tried jumping away from walls, didn't know you had to dodge jump away.
_________________
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Back to top
View user's profile Send private message
Quake Matt



Joined: 05 Jun 2005
Posts: 129

PostPosted: Mon Jul 31, 2006 11:35 am    Post subject: Reply with quote

Quote:
Oh yeah it can screw one up, just look at Peak Monastery in UT.

Yeah, that was a killer! Fortunately, it always reminded me to go into the options and turn dodge off if I hadn't already!

On the subject of wall-jumping, has anyone tried adding it to Quake? I did in a mod a few years ago, which basically just threw out some tracelines whenever you pressed jump while in the air. If one of them found a wall, it'd bounce you away at the appropriate angle.
Back to top
View user's profile Send private message
Error
Inside3D Staff


Joined: 05 Nov 2004
Posts: 558
Location: VA, USA

PostPosted: Tue Aug 01, 2006 7:52 am    Post subject: Reply with quote

dodging is useless... therefore I disabled it.

lava (acid whatever), never-ending pits, and far falls make me hate it.
_________________
Inside3D : Knowledge Is Power
Darkplaces Documentation Wiki
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group