View Full Version : PM_Weapon Trouble.

06-26-2002, 09:43 AM
I'm attempting to make all gun type weapons use clips/magazines, after 30 shots or so the player must reload.
(Look at the E11 Carbine, that box coming out of the left side with that little button looks just like a box magazine)

Anyway, in PM_Weapon I do a ammo check.

if (pm->ps->stats[STAT_CLIP] <= 0)
blah blah

I have gotten everything as far as gameplay goes to work correctly. When you shoot the 20 rounds off the magazine you need to reload before continuing to fire.

My problem is that when you have emptied the magazine and press fire, you get muzzleflash and fire sound, but no projectile is created. I can't get the muzzleflash/sound to go away.

I've spent a while trying to fix this, but no success, anyone have any ideas??

I do the ammo check at a appropriate spot, before the add fire event occurs.

06-26-2002, 11:53 AM
I can't help you, but you should research the guns before you set ammo limits. Many of them are made up for the game such as the Flechette and the Repeater, but the E-11 holds 100 rounds per magazine. The others you'd have to make up.

06-26-2002, 10:26 PM
uhhh, where did you read the E-11 has a 100 round magazine? Website somewhere?

100 rounds is a lot, considering the amount of energy a blaster bolt has to have to do damage as seen in the SW movies.

You shoulda warned Raven about this before they gave the player this strange ammo system.
If they didn't bother getting these ammo numbers you refer to, I don't know why you expect me to!


For my weapon code problem, I'm gonna try to see if the muzzleflash is added in a seperate section when the fire button is detected, because by default, JK2 code forces the player to switch guns when out of ammo, so it doesn't give the player a chance to pull the trigger when empty...

Anyone have ideas about this?