View previous topic :: View next topic |
Author |
Message |
Alex.mac
Joined: 12 Jul 2010 Posts: 8
|
Posted: Mon Jul 12, 2010 5:24 pm Post subject: 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.
Code: | 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? |
|
Back to top |
|
 |
ceriux

Joined: 06 Sep 2008 Posts: 968 Location: Florida, USA
|
|
Back to top |
|
 |
Alex.mac
Joined: 12 Jul 2010 Posts: 8
|
Posted: Mon Jul 12, 2010 5:28 pm Post subject: |
|
|
i already tried changing on autoexec.cfg and ingame too... there's nothing wrong with the code? |
|
Back to top |
|
 |
ceriux

Joined: 06 Sep 2008 Posts: 968 Location: Florida, USA
|
Posted: Mon Jul 12, 2010 5:31 pm Post subject: |
|
|
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 _________________ QuakeDB - Quake ModDB Group |
|
Back to top |
|
 |
Alex.mac
Joined: 12 Jul 2010 Posts: 8
|
Posted: Mon Jul 12, 2010 5:42 pm Post subject: |
|
|
i put your code in there but it didn't work, thanks anyway.
btw, my autoexec.cfg is this
Code: | 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 |
|
Back to top |
|
 |
ceriux

Joined: 06 Sep 2008 Posts: 968 Location: Florida, USA
|
Posted: Mon Jul 12, 2010 5:52 pm Post subject: |
|
|
post up all the chuncks and functions pertaining to your weapon and the projectile. _________________ QuakeDB - Quake ModDB Group |
|
Back to top |
|
 |
Alex.mac
Joined: 12 Jul 2010 Posts: 8
|
Posted: Mon Jul 12, 2010 6:01 pm Post subject: |
|
|
i just found this on misc.qc and changed to 10000 too
Code: | 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  |
|
Back to top |
|
 |
ceriux

Joined: 06 Sep 2008 Posts: 968 Location: Florida, USA
|
Posted: Mon Jul 12, 2010 6:04 pm Post subject: |
|
|
i cannot download anything i live at a government school at the moment. use pastebin and post the links. _________________ QuakeDB - Quake ModDB Group |
|
Back to top |
|
 |
Alex.mac
Joined: 12 Jul 2010 Posts: 8
|
Posted: Mon Jul 12, 2010 6:11 pm Post subject: |
|
|
weapons.qc
misc.qc
and this is autoexec.cfg
Code: | sv_maxvelocity 10000
deathmatch 1
map e1m1 |
|
|
Back to top |
|
 |
ceriux

Joined: 06 Sep 2008 Posts: 968 Location: Florida, USA
|
Posted: Mon Jul 12, 2010 6:13 pm Post subject: |
|
|
and your modding the nail gun...? sorry i dont have the time to just look through everything... doing my school work and on the pc at the same time. _________________ QuakeDB - Quake ModDB Group |
|
Back to top |
|
 |
Alex.mac
Joined: 12 Jul 2010 Posts: 8
|
Posted: Mon Jul 12, 2010 6:15 pm Post subject: |
|
|
yes, i've tried to mod the nailgun and the super nailgun. |
|
Back to top |
|
 |
ceriux

Joined: 06 Sep 2008 Posts: 968 Location: Florida, USA
|
Posted: Mon Jul 12, 2010 6:32 pm Post subject: |
|
|
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. _________________ QuakeDB - Quake ModDB Group |
|
Back to top |
|
 |
Alex.mac
Joined: 12 Jul 2010 Posts: 8
|
Posted: Mon Jul 12, 2010 6:36 pm Post subject: |
|
|
doesn't solve, but thanks for your patience. |
|
Back to top |
|
 |
ceriux

Joined: 06 Sep 2008 Posts: 968 Location: Florida, USA
|
Posted: Mon Jul 12, 2010 6:41 pm Post subject: |
|
|
sorry then man i could probably figure it out if i had a compiler and a game infront of me. but saddly its pretty impossible at the moment... for me to help. _________________ QuakeDB - Quake ModDB Group |
|
Back to top |
|
 |
DukeInstinct

Joined: 10 Jul 2010 Posts: 4 Location: DukeLand
|
Posted: Mon Jul 12, 2010 10:39 pm Post subject: |
|
|
You are remembering to put your compiled progs.dat into your .pak file, right? _________________
Coder/3d modeler for UrbanWars |
|
Back to top |
|
 |
|