i have been writing an rpg the last few years and when a player dies they have always lost a constant percentage of health like so:
if(player[usrnum].exp)
{
player[usrnum].exp-=(player[usrnum].exp * .10);
}
i want to change it to make it configurable where it takes a specific
percentage based off what was read from the configuration on startup.
int percent = 10;
player[usrnum].exp -= percent; /* is what im going for */
any help would be greatly appreciated.
ill be darned, yeah exactly like that don't i feel like an idiot.
input that into a test window as exp 94 and percent 5 and it shot back 89.
much help appreciated!