Hi,
I want to make a buff spell that heals the buffed unit if the damage it has taken with one hit is above a certain percentage(10% in my map) of its max hp. So for example when the unit has 100 hp and it gets 8 damage nothing happens. If it takes 10 or more damage it is healed for some points.
Problem: With a generic unit event i can only refer to 'Unit is attacked', but then i cant get the amount of damage taken and cant compare it to the max hp of the attacked unit.
When I do it with a specific unit event I only can select units that are already placed on the map, what doesnt work with my idea. I tried to store the buffed units in a unit array, but that didnt work either.
Has anyone an idea how to realize that spell?
Greets Bonzo
I want to make a buff spell that heals the buffed unit if the damage it has taken with one hit is above a certain percentage(10% in my map) of its max hp. So for example when the unit has 100 hp and it gets 8 damage nothing happens. If it takes 10 or more damage it is healed for some points.
Problem: With a generic unit event i can only refer to 'Unit is attacked', but then i cant get the amount of damage taken and cant compare it to the max hp of the attacked unit.
When I do it with a specific unit event I only can select units that are already placed on the map, what doesnt work with my idea. I tried to store the buffed units in a unit array, but that didnt work either.
Has anyone an idea how to realize that spell?
Greets Bonzo