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

Setting the weapon and equipment screen variables

Now that you have a weapon in your Weapons Data Table, we can set up a framework to equip this weapon.

Just like the items that you created, you can choose to populate the weapons in a shop, you can choose to allow weapons to be picked up automatically from other NPCs in the field, or you can make them enemy drops just like you did with gold. Whichever method you choose, make sure that the weapons end up getting populated in your equipment screen in a similar way in which the items got populated in your inventory screen. At the bare minimum, we will need the character to hold an array of weapons. Navigate to the FieldPlayer Blueprint and open the Event Graph. Then, add a new text array variable ...

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