How do I limit the amount of ammo bullets?

what is the best blueprint scripting to limit the number of rounds that the player can shoot? I want to limit to their ammo to 20 rounds.

no answer yet. :frowning:

You need some way to keep track of the bullets. This will likely be an integer because you’re not dealing with fractions of ammo. When you fire your gun, first you check if your ammo variable is less than or equal to 0. If it is, the weapon doesn’t fire, if it’s not, the weapon fires and you subtract 1 from your ammo variable.

Really though, this is a pretty simple question and one you could have learned via YouTube tutorials. I’d recommend VirtusLearningHub if you’re at this stage with Unreal.

I appreciate your reply, but I’ve looked at numerous video tutorials.
I can adjust the fire rate, I can adjust its physics, I learn how to add a flash to my weapon’s firing. There is even a four-part video series on making a reloadable system - but I haven’t found a quick video on controlling the number of rounds fired.
if you could point out a video that would be greatly appreciated.