O'Reilly logo

Building an RPG with Unreal 4.x by Alan R. Stagner, Steve Santello

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The item button framework

Before we link our items to the shop, we will first need to create a framework in which the items are placed in the shop. What we would like to do is create a button for each item that the shop owner sells but, in order to make the interface scalable in such a way that NPCs can hold different selectable items, it would be wise to create a Scroll Box framework that holds a single button with a default value for the item's text/description. We can then dynamically draw the button for as many items as the shop owner carries, as well as dynamically draw the text on each button.

To do this, we must first create a Widget Blueprint by navigating to Content | Blueprints | UI and call it Item:

Open Item. Since we are going to make ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required