Here is my code.
loop:
self.moveXY(43, 50)
topEnemy = self.findNearestEnemy()
if topEnemy:
self.buildXY("fire-trap", 43, 50)
self.moveXY(25, 34)
leftEnemy = self.findNearestEnemy()
if leftEnemy:
self.buildXY("fire-trap", 25, 34)
self.moveXY(43, 20)
bottomEnemy = self.findNearestEnemy()
if bottomEnemy:
self.buildXY("fire-trap", 43, 20)
Every time I run this the knight makes rounds like normal but the 3rd time she get’s north an ogre shows up on west. She builds a fire trap north then the ogre from the west comes and kill my villagers. I’ve copied my code straight from the help video and still it’s not working.
Suggestions?