Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

(python) how do you make my guy ignore sand-yaks?


I cant figure out a way to ignore yaks they are always getting in my way
i just cant define it for some reason( it says the other one is, but its not i checked)
the other ones work exept when i add the sand-yak one

while True:
thrower = self.findNearest(self.findByType(‘thrower’))
shaman = self.findNearest(self.findByType(‘shaman’))
fangrider = self.findNearest(self.findByType(‘fangrider’))
headhunter = self.findNearest(self.findByType(‘brawler’))
ogre = self.findNearest(self.findByType(“ogre”))
sandyak = self.findNearest(self.findByType(“sand-yak”)
if thrower:
if shaman:
if fangrider:
if headhunter:
if ogre:
if sandyak:
self.moveXY(28, 68)
enemy = self.findNearest(self.findEnemies())
if enemy:


Read the FAQ before posting code. It will tell you how to format it properly

The error message in your code is because you forgot a ) at the end of line 7.

It should read:

sandyak = self.findNearest(self.findByType("sand-yak"))


ok i solved it thanks