# [SOLVED] Lost Viking Help Please Exploding Issue

I am getting blown up on LOST VIKING. I get over the first bump and then down the other side but I think I may be missing one last step down which causes me to blow up when switching to go back up, but I can’t see why this is happening.

Attached is my code if anyone has a suggestion

``````# 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!
SWITCH = 6
SLIDE = 8
SKIP = 11

# 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
sideStepsInc=1
# 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

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

sideSteps += sideStepsInc

if sideSteps>SLIDE:
sideSteps=1

elif sideSteps<1:
sideSteps=SLIDE

if steps%SWITCH==0:
sideStepsInc*=-1
hero.say('about to switch inc now: '+sideStepsInc)

``````
2 Likes

I think you should do steps += 5 instead of steps += 1

1 Like

I tried that and it unfortunately didn’t work.

Then I tried a lot of other random numbers but they also didn’t work (in case you had made a typo), but thanks for the suggestion.

1 Like

Maybe steps += 7 instead of 5

1 Like

With an infinite amount of numbers to choose from, I think it may take some time if we just keep guessing which number might work.

1 Like

Sorry if I couldn’t help you with the exploding issue in particular, but it is possible to complete Lost Viking with moveXY, believe it or not ! I know that the level doesn’t allow you to get specific XY positions with the mouse pointer, but it takes some thinking outside of the box - what about the burls’ positions? Why not move relative to their positions or add and subtract until you get to a position that doesn’t give you an exploding issue? Have a think about that.

This is a very difficult level but I like unorthodox methods for difficult levels (similar to driving backwards in that first race in Ready Player One where Wade beat King Kong and got the first key ).

3 Likes

i try using the burl XY so took some time if you want to use moveXY bc i ever use move XY and works lol kinda cheat

1 Like

Weeeeellllllllll, I don’t think it is a cheat because it isn’t a solution from the Internet, and I still had to use my brain to solve it.

I think that any solution that isn’t originally yours is a cheat. For most levels like this, there is no one way of going about it. The point is that you are meant to problem solve and reason effectively to find the answer.

1 Like

I thought the point of this level is that there is a formula that takes 3 parameters and the path should work based on that formula rather than having to mess around with position of Burls etc.

But no one said you couldn’t think outside of the box… There are some levels that don’t have to be solved in a specific way, e.g. you can use for-loops in Kithgard Dungeon if you know how to use them; or in Restless Dead, you can blow up the skeletons with fire-traps instead of dealing with them head on. Any answer that isn’t someone else’s code (I mean not being a plagiarist) and you have thought of that yourself, is an acceptable solution and does not count as cheating:

2 Likes

Now I seem to be repeating myself too many times…

1 Like

I ‘cheated’ by following the hint instructions I had to put loads of hero.say’s in until I worked out where I was messing up, feels so nice to have done it though.

2 Likes

Congrats on the success !

3 Likes