Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

Help in sarven shepard

can anyone please help me on teamwork in the sarven desert.
this is my code. could you add more into the code?

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 True:
    enemy = enemies[enemyIndex]
    # "!=" means "not equal to."
    if enemy.type != "sand-yak":
        # While the enemy's health is greater than 0, attack it!

    # Between waves, move back to the center.

what stage is this level on?

if it is on sarven the dungen or backwoods i can help but if you are past the geometry of flowers i cannot help (I am a non member)

it is in the sarven desert

I see that you have two while True: loops on the same indentation. Currently, your code keeps looping through the first 3 lines. To allow your second section of code to run, indent the whole group another level. Also, consider using a while conditional loop using the index and the len(enemies) to step through each enemy in the list.

Use another while conditional loop for the enemy health >0 to attack. Don’t forget to increase the index after you defeat the enemy or if the enemy is a “sand-yak”.


oh got it (20 Characters)


  • you need a while enemy health

  • an elif enemy

  • hero.attack

  • and a move xy

that is all you are missing right now

thank you(20 characters)