you must be getting sick of me by now
Moderator: InsideQC Admins
7 posts
• Page 1 of 1
you must be getting sick of me by now
well i have a simpler question this time, just wondering if there is a max velocity for object to travel at. i seem to be in a bit of a hole here trying to make a projectile firing sniper rifle, i mean it works and quite well, but the "bullet" fires at a speed i cannot seem to increase. well thats it now, unless you can help with my other problem, a bit more complex. i made a mdl spawn infront of the player as a scope for the sniper rifle, works great thanks to wazat
not really my code just an example:roll:
scopeCheck =
{
if(self.owner.scoped == 1)
return;
if (self.owner.scoped == 2) called when shoots gun
self.owner.zoomview = 1;
remove(self);
};
make scope =
}
scope = spawn();
scope.viewclientWHATEVER = self;
blah blah;
scope.owner = self;
scope.scoped = 1;
scope.think = scopeCheck;
scope.nextthink = time + 0.1;
};
any ideas? mail me for more specifics i know this is poor lol
one more thing lol sorry if this is explained in dpextension, but limiting player movement speed, a lil help? hah im guna get banned from this forum for all my questions..
-Root one
-

RooT - Posts: 40
- Joined: Wed Sep 07, 2005 1:28 am
sv_maxvelocity cvar. Its default is 2000 I think, which is 2000 quake units per second, which is not fast enough for a bullet (which should generally travel 6000-15000 quake units per second depending on your scale)
As for the scope stuff... all you have to do is remove the scope entity and it will disappear. In your code, you are setting the 'scoped' field on the scope entity to 1. Then the think the function, in which self refers to the scope, you are using 'self.owner.scoped', when the scoped field was set on the scope, not its owner. Also, you're checking if scoped == 2, and I don't see anywhere where it is actually set to 2 so that code could be run...
Player movement speed cvars:
'cl_forwardspeed' sets forward speed
'cl_sidespeed' sets left/right strafe speed
'cl_backspeed' sets backward speed
'cl_upspeed' sets up/down speed when noclipping/flying/swimming
'cl_yawspeed' sets keyboard left/right turning speed
'cl_pitchspeed' sets keyboard up/down turning speed
All those cvars are client side. Clients send 'ideal speed' values for each direction to the server (not simply whether the movement buttons are up or down.. which I find a little silly). The server limits the final speed with the 'sv_maxspeed' cvar.
As for the scope stuff... all you have to do is remove the scope entity and it will disappear. In your code, you are setting the 'scoped' field on the scope entity to 1. Then the think the function, in which self refers to the scope, you are using 'self.owner.scoped', when the scoped field was set on the scope, not its owner. Also, you're checking if scoped == 2, and I don't see anywhere where it is actually set to 2 so that code could be run...
Player movement speed cvars:
'cl_forwardspeed' sets forward speed
'cl_sidespeed' sets left/right strafe speed
'cl_backspeed' sets backward speed
'cl_upspeed' sets up/down speed when noclipping/flying/swimming
'cl_yawspeed' sets keyboard left/right turning speed
'cl_pitchspeed' sets keyboard up/down turning speed
All those cvars are client side. Clients send 'ideal speed' values for each direction to the server (not simply whether the movement buttons are up or down.. which I find a little silly). The server limits the final speed with the 'sv_maxspeed' cvar.
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.
- Sajt
- Posts: 1215
- Joined: Sat Oct 16, 2004 3:39 am
-

RooT - Posts: 40
- Joined: Wed Sep 07, 2005 1:28 am
Which mission pack source? It's in neither of the ones found here:
http://wiki.quakesrc.org/index.php/Downloads
http://wiki.quakesrc.org/index.php/Downloads
- FrikaC
- Site Admin
- Posts: 1026
- Joined: Fri Oct 08, 2004 11:19 pm
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest