Multiplayer TopDown Kit

It’s really just all about setting up the InventoryInterface and overriding the InteractableInterfaces OnUsed() function to let the player load the Inventory of an actor as a container.
I can provide you with a merged project for 4.14 that has the zombies setup with loot. It’s basically just duplicating the work done in the existing container code in a character class.

What I did for the demo in the merged project was create a child class of **BaseCharacter **called LootableCharacter
*(This example is just for the Zombie which doesn’t use EquipmentCharacter. So it’s only using the normal **InventoryComponent **not the EquipmentInventoryComponent, but it’s easy enough after these steps to set this up how you want if your NPC’s wear items.) *

LootableCharacter Class]
1.) In the **LootableCharacter **class settings you will want to add the **InventoryInterface **(It already inherits the Interactable Interface from the BaseCharacter class)

2.) Add an InventoryComponent.

3.) Setup the implementations for the Interface functions. You will need to create the variables for things like** InventorySize**, PlayersViewing, etc.

4.) Setup the functions and logic just like in the Loot_Actor . Here are screens to show the logic setup for the ConstructionScript, Event Begin Play, InitializeInventory(), GetLootList(), OnUsed()](https://vanguardinteractive.com/storage/app/media/unreal/marketplace/mptopdownkit/examples/lootable/LootableCharacter_2.jpg) andGetRandomItems()](https://vanguardinteractive.com/storage/app/media/unreal/marketplace/mptopdownkit/examples/lootable/LootableCharacter_3.jpg)
*(The GetRandomItems() logic here is a little bit different as seen in the Loot_Actor version as I removed the 2 basic macros to make it cleaner). *
You will need to create the variables like MinLootItems/MaxLootItems, local variables etc. I would suggest just cut and pasting the logic from the Container/Loot actors. But rebuilding it from scratch using the screenshots also helps you understand what the logic is actually doing.

Zombie Class]
1.) **Reparent **the **Zombie **to be a child of the new **LootableCharacter **class.

Now your zombies will randomize a basic inventory based on the supplied loot list (just like the Loot_Actor examples do).
The OnUsed() logic only allows us to loot them when they are dead.

This is just one way of many to implement lootable characters with the inventory system.
You can look at the Tandy/Muppet NPC’s in the ARPGIS demo if you also want some different items on how to supply loadouts to NPC’s that can use EquipmentInventoryComponents and wear the items.

*Feel free to get creative and design it in a way that works best for your game. It really is just as simple as setting up the **InventoryInterface **and overriding the **InteractableInterfaces OnUsed() *function.