A little help on this level? My character doesn’t sense the charging yaks, and therefore doens’t build the fences necessary to keep the yaks from killing me. My code is:
# Get to the oasis, # fencing off paths with yaks on them as you go. loop: enemy = self.findNearestEnemy() if enemy: # If the yak is above you, build a fence 10m below it. pos = enemy.pos x = pos.x y = pos.y if y > 35: self.buildXY ("fence", x, y+10) # If the yak is below you, build a fence 10m above it. elif y < 25: self.buildXY ("fence", x, y+10) pass else: # Move right towards the oasis. self.moveXY (69, 32)
Any help would be greatly appreciated.