Page 1 of 1

5 weapons - 1 ammo ?

Posted: Sat Nov 22, 2008 1:01 pm
by Rawing
I been trying to make five different weapons using the same ammo.
bg_misc: Can't define more than one weapon to the ammo
bg_pmove: I tried to make a switch that counts ammo away if one of this five weapons is fired... like...
if(pm->ps->weapon==wp_lightning){pm->ps->ammo[wp_redlet]--;}
I wasn't suprised to see some errors :D

Re: 5 weapons - 1 ammo ?

Posted: Tue Dec 23, 2008 6:15 pm
by Rawing
I managed to solve this partly. What I've done is simply take an ammo of another weapon away. However, sometimes I'm still able to shoot without ammo or just the sound is played and the missile drawn but it doesn't do any damage. I've modified the EV_NOAMMO too of course, but it can't find out why it works sometimes and sometimes not :/

Re: 5 weapons - 1 ammo ?

Posted: Tue Dec 23, 2008 7:41 pm
by corncobman
Have you compiled both cgame and game?

bg_* stuff needs the client to be compiled as well.

Re: 5 weapons - 1 ammo ?

Posted: Wed Dec 24, 2008 1:55 pm
by Rawing
yup, I mostly compile all three parts of it just to avoid things like that.