Vote count:
0
I am making an rpg game for web browsers and for the life of me I cannot figure out how to implement a way to Regen Health based on a % of Maximum Health. Any help is greatly appreciated!
This gets the characters Max HP
getMaxCharHP() <-- Prints out a # like 400
This Gets The Characters Health Regen Rate Per Minute
getCharHPR() <-- Prints out a # like 22.31
How can I write some code to run every minute and restore X% of MaxHP?
Would a cron job be my best approach or does anyone know of a way to do it inside php code?
asked 22 secs ago
Health Regen For My Web Game
Aucun commentaire:
Enregistrer un commentaire