[Simple Build System] Integrating with Multiplayer Survival Game Template #2

!!!!WARNING!!!!
BEFORE YOU PROCEED WITH THIS, YOU MUST READ MY DOCUMENT ON HOW TO EDIT BLUEPRINT STRUCTS & APPLY THE SAME METHOD BEFORE PROCEEDING WITH THIS! OTHERWISE YOUR PROJECT WILL MOST LIKELY BECOME A NIGHTMARE TO FIX!!!!!

You can find the document here:

How to edit Blueprint USTRUCTS() in Unreal Engine

Have you read the document? Good, then you can proceed!

  • Open the Str_SGT_InventoryItem Struct

Wait.. did you really read my document? Ok, just making sure!

How to edit Blueprint USTRUCTS() in Unreal Engine

  • Add a new Variable

  • Make the new variable a E_ResourceType Enum

  • It should look like this when done:

  • Save the struct & Restart the editor (DO NOT SAVE ANYTHING ELSE BESIDES THE STRUCT!!!!!!!!!!!!!!!!

  • After restarting, open the DT_SGT_Items Data Table

  • In this example, we’re going to use the included Wood Plank item as our Wood resource item

  • Next, open the C-Building Component

  • Navigate to this event graph, modify the default graph to look like this:

  • This is an example of the GetPlayerResource function to find our Wood resource

  • Finally, add this interface & function call to the RemoveResourceFromPlayer() function

  • That’s all you have to do, in order to use Stone, just do the same procedure with adding new items to the Data Table (DT_SGT_Items)