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

[SOLVED] Sarven Road Python help


Just a warning,this is my first post so I may not format my code properly.In the level “Sarven Road” my hero cannot seem to move. here is my code:

# Get to the oasis. Watch out for new enemies: ogre scouts!
# Go up and right by adding to the current X and Y position.

while True:
    # If there's an enemy, attack.
    xPos = hero.pos.x
    yPos = hero.pos.y
    enemy = hero.findNearestEnemy()
    if enemy:
    # Else, keep moving up and to the right. 
        hero.pos.x + 3
        hero.pos.y + 3

If there is more information that you need to solve this problem, please tell me


Never mind. …I figured it out.

1 Like

Cool, sorry I didn’t reply earlier. I must have missed your post. :confused:
:lion: :lion: :lion: