I have this blueprint, but the value of the money becomes negative. What do I need to do to ensure it stays at least at 0
Hey there @draygas! It looks like you’re subtracting after the clamp, it must be before for it to clamp the value. I’d also recommend before that verifying the player has the money for the cost first, then only executing the sale if they can afford it and the clamp is just a failsafe and money cap kind of like this quick mockup:
3 Likes
Thank you very much, this happened when I wrote the algorithm without thinking, now it is solved
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.