Page 1 of 1

Health Drain/Regeneration Questions [Solved]

Posted: Mon Oct 19, 2020 11:15 am
by BarbylBapkins
I'm currently playing with the idea of having certain classes constantly regenerate health at an extremely slow rate, without the use of an ability. My current plans involve either giving these classes heroes' health bars and messing with their drain rates, or giving them Bacta Tank Bonus-like effects, but I haven't been able to figure out where the behaviors of either of these mechanics are controlled from. I looked for the hero health bar mechanics in "com_inf_default" and "com_inf_default_hero", but I didn't see anything in either location that looked like it controlled the specific health bar behaviors I was looking for. As for the Bacta Tank Bonus's effects, I didn't find any odf or lua files that sounded like they would contain anything useful, at least based on my limited knowledge. If anyone knows more about these mechanics, or if they've managed to implement something like this through another method, your knowledge would be much appreciated.

Re: Health Drain/Regeneration Questions

Posted: Wed Oct 21, 2020 11:48 am
by Marth8880
You simply add

Code: Select all

AddHealth = "1.0"
to the unit's ODF, replacing 1.0 with whatever your desired added health-per-second is. :)

Re: Health Drain/Regeneration Questions

Posted: Wed Oct 21, 2020 5:05 pm
by AnthonyBF2
Hero health bar only applies to characters that has been designated as a hero class (SetHeroClass in the mission scripts).
You will need to use AddHealth on the character ODFs.

Re: Health Drain/Regeneration Questions

Posted: Fri Oct 23, 2020 7:16 am
by BarbylBapkins
Many thanks to both of you!