npcs are killed on one attack
|
|
Problem description:In my pokemon game the training dummies disappear in one hit (they respawn in a minute) but its not supposed to happen. i run my deathcheck on both the mob and the usr and it checks for 0 hp every attack. but i gave the dummie inf hp but i cant figure out the problem
npc Training_Dummy icon = 'Training Dummy.dmi' icon_state = "" type1="Trainer" type2="Bad" HP=9999999999999999999999999999999999999999999999999999999999999999999999999999999...(continues for a long time)
proc deathcheck() if(src.client) if(src.HP <= 0) view() << "[src] has fainted!" usr.money /= 1.4 src.loc=locate(20,110,1)//mobs will respawn in this place else view() << "[usr] made [src] faint" usr.money += rand(100,500) del(src)
|
Try the if(src.HP <= 0) under the Else.