Hello, i have a probleme at the weapon reload system.


Hello, i’m making a gun reload, and i got a probleme, when ammofull is getting empty (if ammo = 0, and ammofull=20 => ammo=20 and ammofull = 0) when is this case ammo is remaining on his initial form and ammofull is getting 0, but it doesn’t add to ammo the ammo =))

You need to create a buffer variable to hold the value of the number of ammo you can use.

It’s all about pure functions (get a variable). After setting the AmmoFull value in the second formula, you are already using the new AmmoFull value, and therefore Ammo does not have the value you expected.