Problem with damageTile and skeleton_patrol
Posted: Sun Oct 14, 2012 8:10 am
I got a script that periodically looks for any nearby enemies with "skeleton" in their name, and damages them. It works fine with normal skeletons, but with skeleton_patrols, it will damage the entire group for each skeleton in it, causing it to take four times the damage. I tried making a different check with different damage for each type of skeleton, that just made them take the damage for each.
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)
end
end
end
end
end