Question guys, how would i go about doing a currency system in blueprints? I have been searching, cant find anything on it. Im trying to do lets say…Level loads you start with X amount. When you buy something in the world (Structure) it takes partial of your money.
If you tried to implement some kind of health/score system then you are familiar to process. Currency,gold,dollars or whatever you call is just a variable. Make an integer/float variable and add or substract from it when player gains/loses money.
To do this simple math,you can search “+” or “-” in BP node creation box.
But inorder to execute this simple code you need a trigger. How your player buys stuff? Does he press a key,or click something on screen? Or what? First one is easily achievable with key input events that is shown dozens of times in tutorials,second one is UMG/HUD related. For it,feel free to watch some videos about UMG.
Exactly as Ariakius said, a currency system is simply a different but bp equivalent health/ammo system. Google/YouTube health/HUD and you’ll get quite a few options.
Logically your just talking about a integer value that is added or subtracted during certain events.
Thanks guys will try to check out some videos!