Go to the BP_MasterBuildPart and create a new custom event called Multicast Spawn Death Bag set it to multicast with reliable ticked and add the following inputs.

Name – “Inventory” Variable Type – “S_ItemInventory” Set to Array
Name – “Weapon Inventory” Variable Type – “S_WeaponInventory” Set to Array
Name – “Weight” Variable Type – “Float”
Name – “Slots” Variable Type – “Integer”

Next create a new function in the BP_MasterBuildPart called Spawn Death Bag. Add the same inputs listed above and open the function. Next copy the image below.

Next go use your new function and connect it the the new custom event like in the image below.

Next go to the BP_StorageInventoryComponent and create a new function called Get Free Slot Count and copy the image below. The variable Free Slots L is a local variable that you will need to create.

Next in the BP_StorageInventoryComponent create another new function called Set Death Bag Inventory and create to new local variable the first called Death Bag Inventory variable type S_ItemInventory and set it to an Array. The second local variable call Death Bag Weapon Inventory set the variable type to S_WeaponInventory and set it to an Array.

Next copy the image below and add the highlighted nodes.

Next create a new variable in the BP_StorageInventoryComponent called Drop Death Bag variable type Bool. Set this to true if you want storage components to drop death bags.

Next go to the BP_WoodChestBuildPart to the Destroy collapsed nodes. Then add the highlighted nodes shown in the image below, I have split the images in 2

Next go to the BP_StoneFurnaceBuildPart and add highlighted nodes shown in the image below location is at the top of the screenshot.

Next go to the BP_CampfireBuildPart and add the highlighted nodes shown in the image below, location at the top of the screenshot.

Advertisements