Savern Shepard Help


Use while loops to pick out the ogre

while True:
enemies = hero.findEnemies()
enemyIndex = 0

# Wrap this logic in a while loop to attack all enemies.
# Find the array's length with:  len(enemies)

while enemyIndex < len(enemies):
enemy = enemies[enemyIndex]
# “!=” means "not equal to."
if enemy.type != “sand-yak”:
# While the enemy’s health is greater than 0, attack it!
while > 0:
enemyIndex += 1

# Between waves, move back to the center.

hero.moveXY(40, 33)

My Hero Juststands there please help me.


Custom Solution

Use while loops to pick out the ogre

while True:
enemies = hero.findByType(“scout”)
enemyIndex = 0
if enemy:
hero.say(“Enemy” + enemyIndex)
enemy = enemies[enemyIndex]
if enemy:
ready = hero.isReady(“cleave”)
if ready:

enemyIndex += 1


I can’t read your Code. Pleas Read the FAQ to learn how to make your Code look nice! For now I will do it!


The gray box is imporant. so you need to

Xzanos.say( "use ``` in ``` your code do you see this gray box around me. 
     this sows that you are doing it right")

Do you see the difference? Also the

letters= ("letters")

Xzanos.say(letters "will change fonts")

These where some things you could do with the

Xzanos. say ("cool is it not?!!!")