Page 1 of 1

Health Regeneration

Posted: Tue Feb 13, 2007 7:04 pm
by Nekura
I was wonder how I can make a unit continuously regenerate it's health. I was thinking you'd have some kind of journeyman's heal continuously being cast on the unit by itself that had no flinching effect but how do you make a unit have some kind of permanent effect like that?

Posted: Wed Feb 14, 2007 9:05 am
by Horus
Unit Control
Expiration = Never
Trigger Time = 1.00 to 1.00
Initially Active

Monsters (subj, monster_identifier)
Raise Health Fraction (rhr, fixed)


The value in Raise Health Fraction dictates how fast the unit regenerates, a decently paced regeneration would be 0.03000

Posted: Wed Feb 14, 2007 10:17 am
by A-Red
Yes, that's the best way. Much easier than trying to manipulate projectiles to do it.

One slightly tricky thing that took me a few tries to realize is that the number you put in does not refer to a percentage, unlike most health-related numbers in Loathing. Instead, it's an actual HP value. So, a Warrior has 5.50 possible health, and each second (in Horus's example) he will gain .03 health.

Horus's example is a very slow version; you probably won't be able to see the health bar rising. It's a smoother and weaker regeneration. You can make it as fast as you like, but at higher speeds it will be choppy--you'll see the health bar jump up once every second or so. Setting the activation time to 0 helps, but it's still noticeably jumpy--plus a typical regenerating unit just wouldn't do it that fast, because it would be practically invincible. There are times when it is useful to have a fast regen though--I scripted one for the vampiric drain attack in Grave Tidings that raised .5 every 0 seconds.

Posted: Wed Feb 14, 2007 7:25 pm
by Nekura
Thanks. That one less thing for me to think about now.