It because of that a skeleton patrol is essentially skeleton_warrior x4. So it triggers 4 times on the square, one for each.
You could try countering that by adding "break" after damageTile. With that the "for h" loop should be exited, and iterator should go for next j value.
Code: Select all
function skullcheckB()
for i=-1,1 do
for j=-1,1 do
for h in entitiesAt(party.level,party.x + j,party.y + i) do
if h.name:sub(1,8) == "skeleton" then
damageTile(party.level, party.x + j, party.y + i, 0,10111101, "fire", 20)
break
end
end
end
end
end
I didn't test it but logic says it should work (unless a break function would instead break the whole function

)
:edit: damn typo. 'I didn't tested', lol... -_-