- Joined
- Apr 2, 2018
- Messages
- 8
- Reaction score
- 0
- First Language
- English
- Primarily Uses
- RMVXA
Okay, so I have a script function for a Common Event.
One line is this:
tpreg = (100 * (1 - hp / mhp) / 2).to_f
HP and MHP are defined earlier in the script and work perfectly well, and are the current HP and max HP of the user respectively.
With a current HP of 516 and max HP of 615, tpreg is returning 50.0 after calcs; this makes no sense at all; it's as if the calc is ignoring everything between 100 and /
Can anyone help me out with this?
One line is this:
tpreg = (100 * (1 - hp / mhp) / 2).to_f
HP and MHP are defined earlier in the script and work perfectly well, and are the current HP and max HP of the user respectively.
With a current HP of 516 and max HP of 615, tpreg is returning 50.0 after calcs; this makes no sense at all; it's as if the calc is ignoring everything between 100 and /
Can anyone help me out with this?

