Set Pickup condition when item found, what to do depend on player inventory size
In PlayerBase BP, add new function, called PickupItem:
Promote local variable called ItemINC (INC stands for item incoming )
Continue:
Equal node has to type Equal (Enum) to connect to itemID output
Upper iteminfo S to check what’s holding in inventory, bottom iteminfo S to check what’s pickup
To set if (un)add item in inventory after complete a loop:
Create a 2 child from Base Interactable BP, called HealthPotion BP, Steak BP
Open ItemID _E, add
in data table, set (item ID in table has to match exactly as item ID_E):
Open HealthPotion BP, change item ID:
Repeat the same on Steak
Back to Datatable, change the item ID name and give the same name as the ID, on both 2 items:
Open PlayerBase BP, create:
Test the BP if it works by using print string:
Player base BP:
Base interactable BP:
Drag the steak and healthpotion BP to scene to test