How to Create a weapon that depletes a bar and recharges it's own ammo

I’m currently trying to make a weapon fire, but each time it stops firing it recharges and it’s sort of like a stamina meter for a gun.
would anyone know how to make this?

There’s more than one way, surely. Here’s one:


https://forums.unrealengine.com/core/image/gif;base64

Pull trigger: remove a charge, update widget, stop recharge timer. Then wait for 2s, if nothing happens, start a timer which regenerates 1 charge every .1s , update the widget. If we have 100 charges, stop the timer.

The widget update:

It’s a progress bar and a text block.

vid: https://i.gyazo.com/cd54b89cb445291d…c80f1518b3.mp4

Thank you very much for the help but the firing type is fully automatic and not semi auto

if i wanted
(Pull Trigger and held) -(Bar goes down for duration) what would I do?
I also don’t know the names of the blueprints that I need for that to function correctly

The same, hook it up to the trigger. On the other hand, I can’t possibly know how you set up your firing; you may need to provide more details if you require more help. Hold the trigger, deplete the charges. Release the trigger, regenerate them. You will need extra script if you want to control the charge consumption rate, though. I kept it here as simple as possible.

I used the first person template for this. The graph is in the first person character, the one that spawns projectiles. You will need to create a widget; in this case I had the aforementioned first person character blueprint add the widget to the screen - the *wGunCharge *is the widget reference.
[HR][/HR]
Also, I can zip that project and drop it on Google Drive if that helps, although it nothing more than the screenshot above.