Chapter 7. Gold, Items, and a Shop

Now that you have created an NPC that talks to the player, it is time to allow the NPC to help the player. In this chapter, we will use the NPC as a shop owner, displaying items for the user to buy. Before we do this, the user is going to need some sort of currency to buy the items. We will cover the following topics in this chapter:

  • Setting and getting gold instances
  • Item data
  • The shop screen framework
  • The item button framework
  • Linking the item data

Setting and getting gold instances

While we move on to making a shopping interface, via the Shop button, we must first be able to pull the currency in order to pay for items in the shop. In a previous chapter, we discussed and made placeholders for gold, but we did not ...

Get Building an RPG with Unreal 4.x now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.