void regen(int regH)
{// Spend some life
void self = getlocalvar("self");// get caller
void Life = getentityproperty(self,"health"); //get health
changeentityproperty(self, "health", Life+regH);//add health
}
@script
void self = getlocalvar("self");// get caller
void Life = getentityproperty(self,"health"); //get health
int regH = 1; #how much life you want to recover
changeentityproperty(self, "health", Life+regH);//add health
@end_script
#1 is how much you want to regenerate.@cmd regen 1
anim idle
loop 1
delay 11
offset 50 79
bbox 18 1 47 79
@script
if(frame == 1){
void vSelf = getlocalvar("self");
int iHP = getentityproperty(vSelf, "health");
changeentityproperty(vSelf, "health", iHP + 1);
}
@end_script
frame data/chars/ch4/idle1.pcx
offset 50 78
frame data/chars/ch4/idle2.pcx
offset 50 79
frame data/chars/ch4/idle3.pcx
offset 50 80
frame data/chars/ch4/idle4.pcx