Hello everyone,
I want to create an element resistance system. ex: If boss has 70% fire resistance, they will reduce fire damage taken buy 70%. same to Ice or lightning
I am using Health extension, there is only armor option that reduce all type of damage.
What should I do to create this system? I’ve search on community and it seems there is no same topic.
I tried explaining this but it was too much to explain. So, I took some screenshots. This uses an object variables in the projectile or enemy for the amount of damage and the type meaning say fire or ice.
The player would have a structure with the percent reduction for each projectile type. I used whole numbers because decimals were hard to write and read. So, 10 equals a 10 percent reduction.
Now, when the objects collide, it uses the object variables to calculate the amount of the damage to apply based on the the type and the damage.
It’s using the projectile type variable to dynamically get the value from the player structure variable.
thanks, I will take a look, I also think reduce the damage directly first but I should find whether it’s suitable to the situation