Changing nails speed
Moderator: InsideQC Admins
22 posts
• Page 1 of 2 • 1, 2
Changing nails speed
hi, i'm new to the forum and a newbie in qc programming. i wanna know how to change the nails speed. i searched the web and found this topic right here, but didn't solve my problem. i can set the sv_maxvelocity cvar to a lower number and get the nails to fly slower, but they won't go any faster than the default speed even if i set the cvar to 100000. here is the code.
what am i doing wrong?
- Code: Select all
newmis.velocity = dir * 10000;
};
void() W_FireSuperSpikes =
{
local vector dir;
local entity old;
sound (self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM);
self.attack_finished = time + 0.2;
self.currentammo = self.ammo_nails = self.ammo_nails - 2;
dir = aim (self, 10000);
what am i doing wrong?
- Alex.mac
- Posts: 8
- Joined: Mon Jul 12, 2010 5:17 pm
maybe this?
void() W_FireSuperSpikes =
{
local vector dir;
local entity old;
sound (self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM);
self.attack_finished = time + 0.2;
self.currentammo = self.ammo_nails = self.ammo_nails - 2;
dir = aim (self, 10000);
newmis.velocity = dir * 10000;
};
its hard for me to tell with out the code in front of me im still fairly new to coding and i havnt been able to code ne thing in like half a year now... but the only time i had issues with changing the speed of a projectile came back to max_velocity
void() W_FireSuperSpikes =
{
local vector dir;
local entity old;
sound (self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM);
self.attack_finished = time + 0.2;
self.currentammo = self.ammo_nails = self.ammo_nails - 2;
dir = aim (self, 10000);
newmis.velocity = dir * 10000;
};
its hard for me to tell with out the code in front of me im still fairly new to coding and i havnt been able to code ne thing in like half a year now... but the only time i had issues with changing the speed of a projectile came back to max_velocity
-

ceriux - Posts: 2223
- Joined: Sat Sep 06, 2008 3:30 pm
- Location: Indiana, USA
i put your code in there but it didn't work, thanks anyway.
btw, my autoexec.cfg is this
i've only modified this file (weapons.qc) in those lines i quoted before. if somebody wants the whole file i can upload it.
thank you
btw, my autoexec.cfg is this
- Code: Select all
sv_maxvelocity 10000
deathmatch 1
map e1m1
i've only modified this file (weapons.qc) in those lines i quoted before. if somebody wants the whole file i can upload it.
thank you
- Alex.mac
- Posts: 8
- Joined: Mon Jul 12, 2010 5:17 pm
i just found this on misc.qc and changed to 10000 too
that's all i've changed. i uploaded the the files (weapons.qc, misc.qc and autoexec.cfg) on this link http://www.mediafire.com/?zzuygjgzdyy.
i think that is all i have regarding the projectile and weapon, but if there's more files i can find to modify, please let me know
- Code: Select all
newmis.velocity = self.movedir * 10000;
that's all i've changed. i uploaded the the files (weapons.qc, misc.qc and autoexec.cfg) on this link http://www.mediafire.com/?zzuygjgzdyy.
i think that is all i have regarding the projectile and weapon, but if there's more files i can find to modify, please let me know
- Alex.mac
- Posts: 8
- Joined: Mon Jul 12, 2010 5:17 pm
weapons.qc
misc.qc
and this is autoexec.cfg
misc.qc
and this is autoexec.cfg
- Code: Select all
sv_maxvelocity 10000
deathmatch 1
map e1m1
- Alex.mac
- Posts: 8
- Joined: Mon Jul 12, 2010 5:17 pm
i see no issues with your code. try setting max_velocity to something like 50000 and see if it goes any faster. cause your doing 10000 x 10000 and your max velocity is only 10000 so it wont go any faster.
cause its dir (10000) x 10000 = a . anyways since your capped at 10000 it wont go any higher and your awnser is also being capped.
cause its dir (10000) x 10000 = a . anyways since your capped at 10000 it wont go any higher and your awnser is also being capped.
-

ceriux - Posts: 2223
- Joined: Sat Sep 06, 2008 3:30 pm
- Location: Indiana, USA
22 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest

