STOOPMAN Posted April 3, 2022 for a good amount of time now Ive been working on a joke mod. One of the weapons (which is a cat that behaves like a chainsaw and has an alt fire that shoots a laser) I plan to have an ammo meter, which recharges when your not firing the weapon, But im very confused on how to code it. Im currently trying to base the code off of the laser pistol from space cats saga, yet my brain keeps getting jumbled up in the code. Help is appreciated! 0 Quote Share this post Link to post
MFG38 Posted April 3, 2022 It's actually pretty simple to do - all you need to do is add a call to the A_GiveInventory function in the weapon's Ready state and have the item it gives be the ammo that the weapon uses. 2 Quote Share this post Link to post
STOOPMAN Posted April 3, 2022 25 minutes ago, MFG38 said: It's actually pretty simple to do - all you need to do is add a call to the A_GiveInventory function in the weapon's Ready state and have the item it gives be the ammo that the weapon uses. I added it to my code, and it slightly worked. the ammo counter did go up when the weapon was in its ready state but the weapon started out with 0 ammo (which I want it to start out with 100) and when walking/running the weapon is static since its looping the A_GiveInventory line. I also wanted to code the weapon in a way to where the recharge can be interrupted (kinda like the laser pistol in space cats saga) 0 Quote Share this post Link to post
STOOPMAN Posted April 3, 2022 1 hour ago, MFG38 said: It's actually pretty simple to do - all you need to do is add a call to the A_GiveInventory function in the weapon's Ready state and have the item it gives be the ammo that the weapon uses. 41 minutes ago, STOOPMAN said: I added it to my code, and it slightly worked. the ammo counter did go up when the weapon was in its ready state but the weapon started out with 0 ammo (which I want it to start out with 100) and when walking/running the weapon is static since its looping the A_GiveInventory line. I also wanted to code the weapon in a way to where the recharge can be interrupted (kinda like the laser pistol in space cats saga) I managed to fix the ammo counter starting at 0, but I still have a problem with the charge up not being able to be interrupted (I also found out that the weapon can still fire with 0 ammo which needs to be fixed) 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.