Hi everyone!
I’m very new to the UE4 engine, and in the FPS game I plan on building, I need to know how to implement a store and a currency system, wherein players will earn money little by little when playing for an amount of time, and by getting kills, kill streaks, etc. and spend that money at the store.
I’ve played around with blueprint and tried to work out exactly how I want it to work, players racking up points to spend in the In-Game store from the main menu, and purchase new weapons they can use in the game, different outfits and gear, etc. I have no problem working as hard or as long as I need to in order to make it happen. I have just gotten stuck in working out exactly how to get a store or “shop” system that works…
Does anyone have a good way of telling me how to do this? Its for a PC based game and I’m fairly new to the system (which is why I’m using blueprint) so I don’t really know much about scripting, so if you want to give me advice please try to “dumb-it-down” as much as possible.
Any replies would be much appreciated,
Thank you.
Well, if you are talking about the logic behind a store, it is fairly simple: A player clicks on an object from a shop interface, if they have enough money to buy it, it subtracts the money from the money/curreny variable, and adds the purchased item to their inventory/perks. If you are talking about having a store interface pop up, go onto and search “UE4 UMG tutorial”, that should give you some fairly decent tutorials on the subject.
That sounds like exactly what I’m after. The first option you mentioned. How exactly would I pull that off?
Well my explanation really all depends on how long you’ve been using UE4 or learning computer programming languages. This isn’t really something I could explain in a few short paragraphs either, I suggest you go learn about an inventory system in UE4 for a better explanation than I can offer.
Yah i had the same problem, the best way i can explain it is like this first your gonna have to setup a user interface than youll set up the buttons and as far as ingame currency goes you could do a basic bool meaning for like every coin collect ingame, the code would like this money value > 0 if true add one to Players main money.
if you need me to help you with that just email me at just send emial and ill just help you set by set , if not good luck
In singleplayer this is easy… make umg where you can buy items, then set bool variable that allow you to use weapon… then save game and player can continue play with bought weapons… in multiplayer this is harder (cheating) and you will need probably online subsystem where registered players can save their weapons for later use…
In this tutorial is umg with weapons and prices where you can buy items… check it out
I know this topic is old but what do I do if I want to sell something in the player’s inventory?