PsiclonexD
(PsiclonexD)
September 19, 2023, 12:30am
1
Two days ago, I started developing a game in RogueLike style where enemies attack you. I have one main class and four subclasses.
AI_MOTHER [ class ]
AI_Bomber child <300 HP>
AI_Maserisk child <314 HP>
AI_Hunter child <354 HP>
AI_Bomber child <250 HP>
AI_BOSS_Haptec child <750 HP>
I can’t figure out how to update the UI - Rendering bar [Health] for each of them with his HP.
At the moment, as the photo says, I can see the bar only at 300HP. what’s above, the bar stays stable till the Child/class drains at 299HP.
Mind-Brain
(Mind-Brain)
September 19, 2023, 12:33am
2
Hey @PsiclonexD ! Welcome to the forums!
So you need to make what you have as “300” into a variable!
I suggest “MaxHealth”. Then you do “Health/Maxhealth” to get your %! Because the bar you’re using is 0-1 in decimals, since the health level is over 300, it’s over 1x the max and so it won’t move until dropping below 300
1 Like
PsiclonexD
(PsiclonexD)
September 19, 2023, 7:17am
3
Yes, i know that. But again, as i said
I have multiple Enemys
With various health
And the barhealth it’s for everyone in the photo. How i can make the bluprint to determine the enemy exact health, for each class?
Everynone
(Everynone)
September 19, 2023, 7:54am
4
As above. Add a Max Health var into the base class + functionality that changes it by X. Call in on any child instance and feed it relevant X delta.
I’ll just add that one can see inherited vars on child class by:
This one is somewhat elusive.
1 Like
system
(system)
Closed
October 19, 2023, 7:55am
5
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.