I simply can’t get my head around how to increase my current ammo and keep replenishing it without it going above the “max” current ammo. Any ideas for a solution? It’s probably just adding a float but i honestly can’t get my head around where i should add another float and etcera.
TL;DR Problem with ammo and can’t figure out simple solution.
I’m honestly so clueless, by previous nodes do you mean the "Switch has Authority and the “InputAction” ?
I tried to do something like your picture but failed horribly. Please make it crystal clear.
Put a Clamp Integer node down. Plug Current Ammo into the top input. Plug Max Ammo into the bottom input. Plug Set Current Ammo into the output. Replace that Branch with this node.
You are done.
Clamp will keep the value you input between the minimum and the maximum inputs. It will then send that information through the output. The value will never go lower or higher than what you have clamped it to within that node.
What happens to the value after the node is finished is beyond the Clamp’s scope.
It does work, but it makes the player able to continue spawning bombs which is not what i want. While we’re at it, would you have any clue on how to replenish a bomb after it is destroys itself? In other words. The max ammo is always 4, and the buff blueprint increase your “max current ammo” by 1. So let’s say, i spawn and i begin with 1 current ammo and it will stay that way until i pick up a “ammo buff” does the clamp save the “Max current ammo” and how would i then make it replenish itself to the max current ammo after the bomb has destroyed it self?