So i’m working on a vendor system and was wondering if there is a prefered way to calculate different currencies and how to handle them.
What i currently have are 3 currencies, which i convert to a single float, then subtract the transaction amount. But now i am not entirely sure what the best way is to split the float back to the separate currencies. Ideas are welcome, thanks.
Is it really necessary to store the three coin types separately in the first place? Do you have a carrying limit in total coins? Different exchange rate depending on location?
If not, just store coins and costs as one value and display it as G-S-B in the GUI.
If there are differences, buying from a vendor will be a complicated matter.
Yes. I suggest creating a pure (no execution pin) function “To Coins” in a blueprint function library. One float pin in for the total and three int outputs for the coins.