Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Although you are working with Unity, your explanation of ailments reminded me of the Unreal Engine 4 Damage system. In essence, every entity in UE4 can take damage, yet by default, nothing happens.

So, if you want a character to take damage, you define, in the character, how it takes damage. Then, in the damage giver, you just have to call object.TakeDamage().

The main advantage of this system is that you let the receiving entity deal with how it takes damage. For you specifically, one advantage is that you can create different types of damage. So, here is an example:

*You create a fire imp, when it deals damage to other entities, it calls TakeDamage() and passes as an argument a damage type of Fire.

Now let’s say you have a wood crate and a steel crate. You now define that when the steel crate takes (any) damage, its health is reduced. If it is 0 it gets destroyed.

For the wood crate you define something similar, but also add that if the type of damage is Fire, then the crate becomes alight and deals damage to itself and others over time.*

Hope this helps you implement your damage system.

https://www.unrealengine.com/en-US/blog/damage-in-ue4

(2 edits) (+1)

Thank you so much for the example and reference! That is pretty similar to what I did for the most part, and I will look into it once I decide to properly incorporate the ailments and damage system into the game.

Also when I drew that monster all I intended to draw was a floating fire ball, but seeing it being referred to as an imp gave me a good idea to redesign it a bit and add some interesting features and animations like flaming horns and a moving flaming tail; the 'tail' on that sprite was originally an accident that came about as I was simply trying to add some sparks haha.