> 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/health.md).

# Health system

What would be a good way to implement a health system that fits our game

Enemies will need a health pool, this health pool will need to support multiple 'classes' of enemies, the classes and enemies scripts will have to be separated(ie runners health being lower goes in the runner's scripts), towers will need to do an amount of damage, enemies will have to keep dropping loot.&#x20;

I will be using [Brackeys tutorial](https://www.youtube.com/watch?v=beuoNuK2tbk\&list=PLPV2KyIb3jR4u5jX8za5iU1cqnQPmbzG0) series as an example on how to implement damage.

First i made it so the bullets/towers would get a damage value

Afterwards i had to make it so the enemy received this information. this [was rather easy](https://imgur.com/a/9EUGEXY) to do as i had already set it up so the bullet would destroy the enemy.&#x20;

Now the enemy will need to process the damage[ taken further](https://imgur.com/bFtj4Xt) as well as them dying when they reach 0 hp.&#x20;

Finally when they die they would need to drop some loot, based on a chance.&#x20;

After this is in place we have the barebones core of a tower defense setup, after this we'll be moving on to make items function and be able to place items on our barricades.&#x20;
