View Single Post
Tony.Gamemaster
Junior Member
 
Join Date: Apr 2014
Posts: 17

Old December 4th, 2016, 03:14 PM
I'm creating a new adjustment for temporary hit points. I have a counter set up that will add the counter's total to the character's hit points. It's super-simple.

herofield[tCurrentHP].value += field[pAdjust].value

What I need to do is have the counter start a minimum of 0 and automatically max-out at whatever the character's total (not current) hit points are. For example: If a character has 10hp and they take 8hp of damage, and then they use this counter to add 10 temporary hit points, it needs to stop a 10hp (10/10) and not add the extra 2 (12/10).

Anyone know how I set this limitation?

As a side note, is it possible to have a counter automatically set itself to a value when it is checked off? I have the logic how it needs to calculate but absolutely no idea how it would be scripted.

Thanks! Any help is appreciated.
Tony.Gamemaster is offline   #1 Reply With Quote