Re: help with adding a health regenerating system
I can't really help with out your code, but you could to something like:
int health; // this can also be stored in a class, I don't know how your code works
int healthtime=1000; // How offen the health will regenerate
timer healthtime; // Again can be stored in a class
void main() {
if(healthtimer.elapsed>=healthtime && health<1000) {
healthtimer.restart();
health+=random(1,5);
}
}
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector