Local Co-op Series (Pt 1: player anim)

Pt 4: Prepare Interact item/object (Enumeration) for inventory pickup in Pt5



Create Interact list and table:


Create Enumeration, called ItemID_E (as a basic list of every item)
image.png
create another one, called ItemType_E
Under BP, this time create Strcuture, called ItemInfo_S
Open it, add follow variables:
image.png

Create a BP actor, called Base Structure_BP
Open Item ingo_S, again, add follow veriables:
image.png
Go to Item ID_E, add
image.png
Go to Item Type E, add
image.png
Now in Item Info S, should have a tick sign
image.png

Create a data table, choose Item Info_S as pick row structure,
Called Item Data Table_DT
image.png
(leave later to fill in the table)


Modify PlayerBase functions


Open Player Base BP, Interact function:
Add variables:
Default value for inventory size as 8, max weight capacity as 50
image.png

Create a BP interface in player folder, called Player_BPI
Add 2 functions:
image.png
image.png

Add the interface in PlayerBase BP
Open Check inventory space interface graph, tick Has Space:
image.png

Set Base interactable BP connect to item data table:


Open BaseInteractable BP, recreate the event graph as:
image.png
In construction script:
image.png
image.png

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.