I use the code
enemies = self.findEnemies()
but it says that it doesn’t work. may I have some help???
I use the code
You are targeting multiple targets when you can only target one. You have to do it with a single enemy.
okay but why do the current glasses I have only target everyone when I want to target one?
What glasses do you have?
The Kithgard Workers Glasses
Then define enemy as
self.findNearest(enemies) after doing
enemies = self.findEnemies(). After that all you have to do is replace enemies with enemy in this:
if enemies: and
No problem slamdunx.
Sorry for the extra question but how do I turn enemies into enemy exactly?
didn’t i say that in post 6?
Another thing, I can’t post correct code.
HERE IS A LINK!:
Does code type matter?
are you saying that instead of [quote=“Neel_Sharma, post:6, topic:7123”]
and[quote=“Neel_Sharma, post:6, topic:7123”]
I put enemy in those parentheses? Because if so the game says that enemy isn’t defined.
Have you played the level Lurkers? It explains how to use
findEnemies(). You can also use the documentation found in the spell pallete for
findEnemies() for more examples.
findEnemies()returns an array/list of enemies.
attack(enemy)takes a single enemy argument.
- You cannot
So you choose an enemy from the list of enemies. There are multiple different ways of choosing an enemy:
enemies = self.findEnemies() nearestEnemy = self.findNearest(enemies) # choose nearest enemy with `self.findNearest()` firstEnemy = enemies # choose first enemy in list # Make sure your enemy isn't null/None, then do whatever with it.
@trotod I actually haven’t played Lukers yet, I am currently on medical attention. thanks for the help though.