Thank You for taking the time for viewing the tutorial and sorry for getting my times wrong.
I have tried choosing cast to controller instead of cast to character and it doesn’t work. When walking close to the object I just collide with it instead of the object disappearing.
This is the code included in the player controller : InventorySystemTutorial_SS_02 posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4
If I drag of ‘Owner’ of the ‘SpawnActor’ and chose ‘Player_Controller’ it doesn’t change anything, probably because the code is already in the player controller and I have selected the correct player controller in my game mode.
Who owns the inventory ? That is a good question… I have no idea.
Here are all the blueprints of the tutorial so far, except the player controller which is already above, there are 2 of them, the BP_Inventory and BP_PickUp_Actor :
Let’s start with the BP Inventory :
Event Graph :
Function ‘Get Item Info at Index’ :
Function ‘Get Amount at Index’ :
Function ‘Search Free Stack’ :
Function ‘Search Empty Slot’ :
Function ‘Is Slot Empty ?’ :
Last Function ‘Add Item (Internal)’ :
Now for the BP_Pickup_Actor :
Event Graph :