
is it possible to check the HP of NPC's with a script? I want to respawn a NPC after it is dead.
Atom
addhook("objectkill","respawnNPC") function respawnNPC(id) 	if (object(id,"type") == 30) then -- if NPC 		local x = object(id,"x") -- maybe tilex 		local y = object(id,"y") -- maybe tiley 		local player = object(id,"player") 		local rot = object(id,"rot") 		parse("spawnobject 30 "..x.." "..y.." "..rot.." 0 0 "..player) 	end end --untested
object(id,"health")