Forum

Function Issue

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Function Issue

Postby Ghost_Fang » Thu Feb 25, 2010 5:30 am

I will post my code if necessary, but ill try to explain it so that you can tell me where i might possibly have to look to fix this:

I have it so impulse == 100 is W_sreload.

I also have it so that if self.ammo_shotty == 0 and you shoot, it does W_sreload.

So when i use my shotgun, i can reload anytime, etc etc. But i if i shoot it til there is 0 ammo in the shotgun, impulse 100's W_sreload does NOT work, but if i shoot to reload it works fine..... it calls the same function, have a possible idea why?
Ghost_Fang
 
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Postby ceriux » Thu Feb 25, 2010 6:06 am

maybe because your checking if shotty ammo equals zero in your reload function?
User avatar
ceriux
 
Posts: 2223
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Postby Sajt » Thu Feb 25, 2010 12:40 pm

It could be something to do with the annoying W_CheckNoAmmo (IIRC?) stuff that the id1 progs do, the code that was used to autoswitch to another weapon when you emptied one.

If not, post your reload and attack functions...
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

Postby Ghost_Fang » Thu Feb 25, 2010 1:38 pm

ceriux wrote:maybe because your checking if shotty ammo equals zero in your reload function?


No, that was the first thing i checked.

It acts like it tries, it plays like the first frame then cancels.
I'm at school right now, ill post my code later
Ghost_Fang
 
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Postby ceriux » Thu Feb 25, 2010 6:07 pm

have to see the reload function.
User avatar
ceriux
 
Posts: 2223
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Postby Ghost_Fang » Thu Feb 25, 2010 8:05 pm

alright, ill post it later tonight after school and work about 7 hours from now (2:05 pm)
Ghost_Fang
 
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Postby ceriux » Thu Feb 25, 2010 8:08 pm

lol ill look if im not busy gettin my dick wet.
User avatar
ceriux
 
Posts: 2223
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Postby c0burn » Thu Feb 25, 2010 9:24 pm

:roll:
c0burn
 
Posts: 208
Joined: Fri Nov 05, 2004 12:48 pm
Location: Liverpool, England


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest