Help with find monster script please
Posted: Thu Nov 22, 2018 10:30 pm
I have this script that finds monsters on all levels but can't figure out how to change it to find monsters on the current level only.
for x = 1, getMaxLevels() do
for monster in allEntities(x) do
if monster.name == "ogre" then
print( monster.id..":", " on level "..monster.level,"@", "X:"..monster.x, "Y:"..monster.y )
end
end
end
I'm sure it's obvious but I have tried many changes but still comes back with an error, can anyone point me in the right direction?
for x = 1, getMaxLevels() do
for monster in allEntities(x) do
if monster.name == "ogre" then
print( monster.id..":", " on level "..monster.level,"@", "X:"..monster.x, "Y:"..monster.y )
end
end
end
I'm sure it's obvious but I have tried many changes but still comes back with an error, can anyone point me in the right direction?