enemy1 = self.findNearestenemy
loop:
if self.isReady("cleave"):
self.cleave(enemy1)
else:
self.attack("Chest")
I did this but then i keep dying because whenever i am cooling down, they already kill me… I dont have enough gems to buy a better armor.
All of my friends are stuck in this level only! Please help me so I can help them too! They have been trying to solve it for so long but we can’t solve it…
You need to put the enemy1 = self.findNearestEnemy() variable assignment inside the loop, so that the value is always fresh.
You have: self.findNearestenemy
It should be: self.findNearestEnemy()
The other thing you are supposed to do in this level is to only cleave when they get less than 10m away, not only cleave whenever cleave is ready. Just check the distance like you did in the previous level.
# If the ogres rush at you, cleave them!
# If they stay 10 meters away, attack the "Chest".
self.distanceTo(enemy)
U need to use the above action and don’t forget to attack the ‘chest’ since they are 10 m away, it’s really easy just check the previous lvl as “nick” said
You need to unindent everything by four spaces so that the loop is flush with the left side.
Do you have the glasses equipped which give you findNearestEnemy?
self.isReady("cleave") returns True or False, but you are comparing it with the number 10. You want to change if self.isReady("cleave")>10 : to if self.distanceTo(enemy1) < 10: