Short-sighted Burl level help [Solved]

Hi there,

I’m having real difficulty figuring out what is going wrong with the Short-Sighted Burl level. Please see below for my code. No matter what I put, the burl always sees me in the end and comes and kills me. HELP! This is really frustrating.

2 Likes

I suppose I know where the problem is. I fixed one issue for this level. Could you try it again?
If you still have problems with it, then try to clear your cache or/and use the direct link ( https://direct.codecombat.com/play/level/short-sighted-burl )

1 Like

It worked! Brilliant! So glad to know it wasn’t me going crazy. Thank you very much for sorting that out. My OCD can be happy that I’m don’t have a level that never got done.

1 Like

Thank you for the feedback. Without it I would not have fixed it and other players would have problems with that level.

1 Like

Had some trouble with this one mostly because I didn’t know the command to move to a target’s position. If you could add that in to a previous level, I think it’d make it a lot easier.

1 Like

Yep, it should be moved further. Now it’s in “adventure” mode and you don’t have to solve it.

1 Like

I did the same thing and it doesnt work!! Also the link you posted isnt working too…

1 Like

Could you explain this? What did you do and what doesn’t work?

Could you give a screenshot? I checked it again.

1 Like

if you mean this link: CodeCombat - Coding games to learn Python and JavaScript

try this one instead CodeCombat - Coding games to learn Python and JavaScript

You will need to be logged into direct.codecombat.com to be able to play the level. If you are just logged into www.codecombat.com you wont see your character in direct.codecombat.com. It will be as if you are playing without log gin in.

1 Like

I cant understand where the problem is! For the link @Harry_the_Wanderer help me!! Thank you for your help!!

1 Like

Your hero should always return at the start point. In your code the hero returns only if an item there. Be careful with indents in Python.

2 Likes

The solution may work for Python, but nothing seems to be working for JavaScript.

The hero only makes her way back to the starting X (described as “green”, but it looks red to me) with the addition of an ‘else’ half a dozen times (or so), however once she finds coins in the left chest, she tries to make her way straight to the right chest and gets offed by the burl.

Without the ‘else’, she goes to the left chest, then straight across to the right chest, whereupon death-by-burl occurs; she doesn’t go back to the starting X.

1 Like

For the first case you return ONLY if an item there. For the second case you return if there is NO item. But you need to return for BOTH cases.

1 Like

Im having some trouble as well. My code seems to work, but the burl just follows me and kills off the first villager it sees, and then naturally I loose.

I move to the left chest first, to find nothing and return.
I move to the right chest after, find a coin, move to the coin. Then my hero pauses for a second, allowing the burl to move in. Then I head back to start and continue walking towards left again. However this is the point where the burl just follows me and kills the first villager in the right path.

Any idea what I am doing wrong?

1 Like

Try to remove line 9.

1 Like

@Bryukh added a LUA patch

LUA code patch for - Forest - Short-sighted Burl - posted intro/ overview / and default code

1 Like

Sadly, exactly the same happens. In essence the code works - it does what it’s supossed to do, but it just pauses after taking the coins.

EDIT: Fixed it. My code has 2x the X coordinates for the coin, instead of X and Y. Doh!

1 Like
# Collect coins and run lest the burl will find you.

# Write the function "checkTakeRun" with one parameter.
# If the item exists, take it.
# Move to the start point (the green mark) whether the item or no.
def checkTakeRun(target):
    if target:
        hero.moveXY(target.Pos.x, target.Pos.y)
    hero.moveXY(40, 12)
# Don't change this code.
while True:
    hero.moveXY(16, 56)
    item = hero.findNearestItem()
    checkTakeRun(item)
    hero.moveXY(64, 56)
    item = hero.findNearestItem()
    checkTakeRun(item)

i dont know what wrong with mine it wont let me do anything

1 Like

this is what it says when i try to do the level

2 Likes

Pos --> pos

The case is very important.

1 Like