> For the complete documentation index, see [llms.txt](https://steijn.gitbook.io/devlogs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://steijn.gitbook.io/devlogs/devlog-personal/duos/loot.md).

# Loot system

What would be a suitable loot system that's modifiable as our game grows?

It would need a main inventory, a user interface displaying what's "picked up", an object doing the actual picking up, enemies would have to drop the items, it needs to support multiple items.&#x20;

&#x20;for now i'll be using generic "damage, fjrerate and bullet count" as their names.&#x20;

[This is my tutorial](https://www.youtube.com/watch?v=2WnAOV7nHW0)

First i went and made it so that there was a[ UI aspect ](https://cdn.discordapp.com/attachments/814832411443593226/823499734076358706/unknown.png)to showcase the inventory in. &#x20;

After this was functional i made it so the UI would show a pre-made list of items, that worked without pickups and just added to the inventory list [on startup. ](https://cdn.discordapp.com/attachments/814832411443593226/823505751875649567/unknown.png)

To make it work in our 3D project i've changed it slightly, we use gameobjects[ like so ](https://i.imgur.com/70WbMRK.png) where as the tutorial is based on 2d sprites instead. Eventually i got it to work with in [our project](https://cdn.discordapp.com/attachments/814832411443593226/823519437859848222/unknown.png) Each of these represents a different item.&#x20;

Since there was nothing that could do the picking up i added [an object ](https://imgur.com/a/zThepnM)to our camera drone that would solve this. This is so the player picks up items himself and feels more active during gameplay, something that's missing in most tower defenses.&#x20;

For now enemies drop loot in ondestroy, this is suboptimal and this will be changed when we add the health system in place.
