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

Kithgard Enchanter



For some reason my line 7 isn’t working, was wondering if anyone knows why it’s not working :frowning:

Can you post your code

You hero doesn’t have the method move, so instead of every hero.move write hero.moveXY(target.pos.x, target.pos.y). Also, python doesn’t need semicolons, remove all the semicolons.

also please post your code properly in the future

When you said hero.move(Target) did you mean hero.move(toTarget)?

he does not have the move method

# Define your own simple movement functions.
# Define moveRight
# Note: each function should move the hero 12 meters!
def moveRight():
    target = {"x": hero.pos.x + 12, "y": hero.pos.y}
    while hero.distanceTo(target) > 0:
        hero.moveXY(target.pos.x, target.pos.y)


# Define moveLeft
def moveLeft():
    target = {"x": hero.pos.x - 12, "y": hero.pos.y}
    while hero.distanceTo(target) > 0:
        hero.moveXY(target.pos.x, target.pos.y)


# Define moveUp
def moveUp():
    target = {"x": hero.pos.x, "y": hero.pos.y + 12}
    while hero.distanceTo(target) > 0:
        hero.moveXY(target.pos.x, target.pos.y)


# Define moveDown
def moveDown():
    target = {"x": hero.pos.x, "y": hero.pos.y - 12}
    while hero.distanceTo(target) > 0:
        hero.moveXY(target.pos.x, target.pos.y)


# Now, use those functions!
moveRight()
moveDown()
moveUp()
moveUp()
moveRight()

what happened now did it work

I replaced it with hero.moveXY(target.pos.x, target.pos.y) but now it’s saying this

what happed did you hero move

Nope, it still doesn’t move

also @bladee but you are in the forest since you don’t have Proglamation III finish the forest then complete the level

You get Programaticon 3 in an early desert level.

and he has proclamation II equipped and he has boots that don’t have move which are required for late forest

For each function look at the target variable. Write that for each move statement. The moveRight() function one would be:

hero.moveXY(hero.pos.x + 12, hero.pos.y)
1 Like

They are not required for late forest.

yes they are and you just gave him a direct answer and that is prohibited here

(hashtag complicated way) lol

what i use is basic boots , like move right move up move down stuff

The problem might be because you define target as every single variable so when you use it the system gets confused.