So I trying to but i can seem to figure out what im doing wrong it wont seem to attack the enemy i can move around just fine but i also cant figure out to automate move to gems with the find nearest items function
the code I’m using currently is
while true do
local enemy1 = hero:findNearestEnemy()
self:moveRight()
self:moveUp()
self:attack(enemy1)
self:attack(enemy1)
self:moveRight()
end
The thing is, you (@TheCelestial ) have to define enemy right before attacking, and the line i told you to add, you should remove it, and then make sure you go down twice after moving right after attacking the enemy
i dont understand, what s/he should do is move right, then up, then define enemy local enemy = hero:findNearestEnemy() and then attack the enemy twice, then move to the right, then go down twice and then move up