Help on lost Viking

need help. this is all I got

You MUST click on the HELP button to see a detailed description of this level!

side = 10
switch = 7
skip = 11

The raven will tell you what to use for your maze parameters!

hero.

How many sideSteps north of the Red X you’ve taken.

sideSteps = 1

How many steps east of the Red X you’ve taken.

steps = 1

Multiply this with steps to determine your X coordinate. DON’T CHANGE THIS!

X_PACE_LENGTH = 4

Multiply this with sideSteps to determine your Y coordinate. DON’T CHANGE THIS!

Y_PACE_LENGTH = 6

The maze is 35 steps along the X axis.

while steps <= 35:

# Take the next step:
hero.moveXY(steps * X_PACE_LENGTH, sideSteps * Y_PACE_LENGTH)

# Increment steps and sideSteps as appropriate, taking into account the special rules.
steps += 1

sorry new to the posting

let me try again
# You MUST click on the HELP button to see a detailed description of this level!
slide = 10
switch = 7
skip = 11

The raven will tell you what to use for your maze parameters!

How many sideSteps north of the Red X you’ve taken.

sideSteps = 1

How many steps east of the Red X you’ve taken.

steps = 1

Multiply this with steps to determine your X coordinate. DON’T CHANGE THIS!

X_PACE_LENGTH = 4

Multiply this with sideSteps to determine your Y coordinate. DON’T CHANGE THIS!

Y_PACE_LENGTH = 6

The maze is 35 steps along the X axis.

while steps <= 35:

# Take the next step:
hero.moveXY(steps * X_PACE_LENGTH, sideSteps * Y_PACE_LENGTH)

# Increment steps and sideSteps as appropriate, taking into account the special rules.
steps += 1

You should probably come back to this level later if the above is all you can come up with so far. It’s a complicated level for beginners.

It is not that hard once you know what to do I just used move XY then later used my boots of jumping and jumped over them. I did it the hard way a couple times and if you aren’t going to use a method that cheats I wouldn’t do it in the forest.

1 Like

1.) how did you jump to it because I have the same I cant
2.) how do you beat it. I use moveXY to the dead viking I it didn’t work

Really because the boots are supposed to jump over fire traps and fences.

I used moveXY and it takes a while maybe you have to move around the area more or they fixed it as a bug but I doubt it.

Can someone help me on Lost Viking?
This is my code:

# You MUST click on the HELP button to see a detailed description of this level!

# The raven will tell you what to use for your maze parameters!
SLIDE = 9
SWITCH = 5
SKIP = 7
# How many sideSteps north of the Red X you've taken.
sideSteps = 1

# How many steps east of the Red X you've taken.
steps = 1

# Multiply this with steps to determine your X coordinate. DON'T CHANGE THIS!
X_PACE_LENGTH = 4

# Multiply this with sideSteps to determine your Y coordinate. DON'T CHANGE THIS!
Y_PACE_LENGTH = 6

sideDirection = 1

# The maze is 35 steps along the X axis.
while steps <= 35:

    # Take the next step:
    self.moveXY(steps * X_PACE_LENGTH, sideSteps * Y_PACE_LENGTH)
    
    # Increment steps and sideSteps as appropriate, taking into account the special rules.
    steps += 1
    sideSteps += sideDirection
    if steps % SKIP == 0:
        sideSteps += sideDirection
    if steps % SWITCH == 0:
        sideDirection = -sideDirection
        
    if sideSteps < 1:
        sideSteps = SLIDE
    elif sideSteps > SLIDE:
        sideSteps = 1

I’m pretty sure my code is correct. It’s just that my hero runs into a fire-trap when she takes the 21st step.

Can someone help me? Thanks!

2 Likes

Code of blocks is right
Blocks sequence is wrong
There is dependency/conflicts between the blocks

if steps % SKIP == 0:
        sideSteps += sideDirection
    if steps % SWITCH == 0:
        sideDirection = -sideDirection
if sideSteps < 1:
        sideSteps = SLIDE
    elif sideSteps > SLIDE:
        sideSteps = 1
2 Likes

I don’t think I understand.

2 Likes

Skip must be done for step Next to the Skip set point
Example
Skip set point is 7
Skip itself

if steps % SKIP == 0:
        sideSteps += sideDirection

must be done for step 8

Rearrange code sequence
by ctrl-x ctrl-v of skip block
Or
change the skip logic

2 Likes

Are you using Python?

Because I tried out your tips but the level says I have an indentation error.

2 Likes

If you about

if steps % SKIP == 0:
        sideSteps += sideDirection

Is copy paste of your code
Its how it work then you copy just part of code
All spaces from your before second row here.

2 Likes

Can you clarify what you mean? I’m still very confused.

2 Likes

Okay
Place skip block
Right
After move block

Or

if steps - 1 % SKIP == 0:
    sideSteps += sideDirection
3 Likes

Yes! I beat the level and got the helm. Thank you so much @htrnblr !

3 Likes

this level is insanely hard!!

1 Like

It is indeed an optional challenge level :slightly_smiling_face:
If you want help with the level, you can post your code and tell us what your issue is.

2 Likes

@Hellenar i got it!!!

1 Like

I have a problem…

# You MUST click on the HELP button to see a detailed description of this level!

# The raven will tell you what to use for your maze parameters!

# How many sideSteps north of the Red X you've taken.
sideSteps = 1

# How many steps east of the Red X you've taken.
steps = 1

# Multiply this with steps to determine your X coordinate. DON'T CHANGE THIS!
X_PACE_LENGTH = 4

# Multiply this with sideSteps to determine your Y coordinate. DON'T CHANGE THIS!
Y_PACE_LENGTH = 6
slide = 10
switch = 7
skip = 11
to_skip = False
switches = 0
# The maze is 35 steps along the X axis.
while steps < 35:
    # Take the next step:
    if steps % skip == 0 and steps != 0:
        to_skip = True 
    if steps % switch == 0 and steps != 0:
        switches += 1
    if sideSteps > slide:
        sideSteps = 1
    if sideSteps < 1:
        sideSteps = slide
    if to_skip:
        hero.moveXY(steps * X_PACE_LENGTH, (sideSteps + 1)* Y_PACE_LENGTH)
        to_skip = False
        steps += 1
        if switch % 2 == 0:
            sideSteps += 2
        if switch % 2 == 1:
            sideSteps -= 2
    if switches % 2 == 0:
        hero.moveXY(steps * X_PACE_LENGTH, sideSteps * Y_PACE_LENGTH)
        steps += 1
        sideSteps +=1
    if switches % 2 == 1:
        hero.moveXY(steps * X_PACE_LENGTH, sideSteps * Y_PACE_LENGTH)
        steps += 1
        sideSteps -=1
    # Increment steps and sideSteps as appropriate, taking into account the special rules

When I use this code without a pet, it doesn’t work…
Second of all, when I get to the end of the maze, i don’t know why, but the hero triggers a mine and blows up…
Someone help me pls…?

1 Like