The formula you’re looking for is: Round( CurrentHealth / MaxHealth * 100)
.
First get the percentage of current health compared to max health.
For example, 1000
current health divided by 2000
max health is 0.5
.
Percentages are scaled from zero to one. To get it scaled from zero to a hundred we just multiply the number by a hundred.
0.5
times a hundred is 50
.
Then, since you don’t want the fraction when dividing unequally (like 100
out of 300
is 33.33333etc
) we round it so it becomes just 33
.
This is how you would do it in BP: