Copper Meadows NEED HELP!


#1

Whenever I try to put down a flag, My hero will not move. Because of this, I can not complete the level. PLEASE HELP!!! :weary: :anguished:


#2

here is the code:

loop:
    flag = self.findFlag()
    if flag:
        pass  # pass is a placeholder, it has no effect.
        # Pick up the flag.
        
    else:
        # Automatically move to the nearest item you see.
        item = self.findNearestItem()
        if item:
            position = item.pos
            x = position.x
            y = position.y
            self.moveXY(x, y)

#3

You have:

    if flag:
        pass  # pass is a placeholder, it has no effect.
        # Pick up the flag.

I don’t see anything there that tells the hero to move…
I see a comment saying, in effect, remove this pass line
and a comment that says, in effect, put some code here to cause your hero to go get the flag… :smile:


#4

How do I do that? I do not know that code.


#5

I figured out the code, but my hero is not fast enough. What should I do?