How do I fix the logic in my reload system

So I’ll try to be brief but this is a section of my blueprints where the intention is to be able to hit the reload key at any time and if there are bullets in the gun (a six shooter) however many bullets there were in the gun will drop to the ground and then you can pick said bullets back up to use. The issue I’m encountering is if there is say six bullets in the gun and I shoot three of them then reload, dropping three to the floor. What I should then be able to do is pick a single bullet back up and hit the reload key to load a single bullet into the gun. I’ve been scratching my head at it for a couple days and I just can’t for the life of me figure out a way to make it work.

Below is the blueprints before I came back to the problem this morning. In case I’m going in the wrong direction.

The logic here seems confusing for something that is pretty straight forward.

Are you wanting two separate reload functions to (1) remove bullets currently in the chambers and (2) add new bullets into empty chambers? I’d assume this isn’t the case, but it isn’t exactly clear.

If not, the basic logic is:

  1. Player pushes reload button.
  2. Determine how many remain in the chambers, reduce chamber count to 0 and spawn remaining number of bullets to fall to the ground.
  3. Check inventory bullet count and add to chamber count if any available, then decrement that amount from the inventory bullet count.
  4. If the player picks up bullets, add them to the inventory bullet count on pickup, which then can be added to the chamber count with the reload button.

So, you basically have two ints to keep track of the chamber and inventory count, then have a droppable bullet class that is interactable that will call a function on the player to add a bullet to his inventory.

Also, why would you have unexpended bullets be removed from their chambers to fall to the ground? Why not have the reload function simply refill the chambers that are empty? Would reduce the complexity greatly and most likely provide a more intuitive experience for the player.

I’m not sure if it’s the optimal approach, but this is how I’d do it!

In this case, in order to test it, I’m starting with 6 out of 6 bullets and with 30 extra bullets ready to be used for reloading.

Bullets in == 6

Max bullets in == 6

Bullets out == 30

From there, you can use the Available Bullets variable in order to know how many times you want to trigger the “dropped clip sound”.