Morwen
October 28, 2015, 10:12pm
1
I’m having trouble with the Lost Viking level. Here’s my current code (Python):
SLIDE = 8
SWITCH = 6
SKIP = 11
steps = 1
sideSteps = 1
X_PACE_LENGTH = 4
Y_PACE_LENGTH = 6
s=1
while steps <= 35:
self.moveXY(steps * X_PACE_LENGTH, sideSteps * Y_PACE_LENGTH)
if steps % SWITCH == 0:
s = -s
if steps % SKIP == 0:
sideSteps += s
sideSteps += s
if sideSteps < 1:
sideSteps = SLIDE
if sideSteps > SLIDE:
sideSteps = 1
steps += 1
It works just fine for a while, but my character runs into a land mine after about 17 seconds:
Can someone help me debug my code? Thanks in advance!
This particular seed is an interesting one. Because of its boundaries, when sideSteps < 1
, you have to set sideSteps
to SLIDE - 1
instead of SLIDE
. That’s your problem.
1 Like
Morwen
October 30, 2015, 6:11pm
3
Thanks! My code works now and I have a shiny new Viking Helmet!
1 Like
need help i always died every single time:cry:
need help on it
SLIDE = 8
SWITCH = 6
SKIP = 11
steps = 1
sideSteps = 1
X_PACE_LENGTH = 4
Y_PACE_LENGTH = 6
s=1
while steps < 35:
self.moveXY(steps * X_PACE_LENGTH, sideSteps * Y_PACE_LENGTH)
if steps % SWITCH == 0:
s = -s
if steps % SKIP == 0:
sideSteps += s
sideSteps += s
if sideSteps < 1:
sideSteps = SLIDE
if sideSteps > SLIDE:
sideSteps = 1
steps += 1
Can you just give me the code i cant find what im supposed to change in SLIDE = 8
SWITCH = 6
SKIP = 11
steps = 1
sideSteps = 1
X_PACE_LENGTH = 4
Y_PACE_LENGTH = 6
s=1
while steps <= 35:
self.moveXY(steps * X_PACE_LENGTH, sideSteps * Y_PACE_LENGTH)
if steps % SWITCH == 0:
s = -s
if steps % SKIP == 0:
sideSteps += s
sideSteps += s
if sideSteps < 1:
sideSteps = SLIDE
if sideSteps > SLIDE:
sideSteps = 1
steps += 1
Help me pleaseeeeeeeeeeeeeeeee! i need help
MPGTV
January 28, 2017, 2:48pm
9
PLS HELP ME MY CODE IS NOT WORKING here have it
SLIDE = 8
SWITCH = 6
SKIP = 11
steps = 1
sideSteps = 1
X_PACE_LENGTH = 4
Y_PACE_LENGTH = 6
s=1
while steps <= 35:
self.moveXY(steps * X_PACE_LENGTH, sideSteps * Y_PACE_LENGTH)
if steps % SWITCH == 0:
s = -s
if steps % SKIP == 0:
sideSteps += s
sideSteps += s
if sideSteps < 1:
sideSteps = SLIDE
if sideSteps > SLIDE:
sideSteps = 1
steps += 1
MPGTV
January 28, 2017, 3:02pm
10
hey i’m having trouble can you help me out cuz I really don’t know what to do pls help
MPGTV
January 28, 2017, 3:25pm
11
hey guys if you want the code for lost viking i have it here
[Snipped, don’t provide correct code.]
12_3
September 9, 2018, 12:29am
12
Hey guys I’m doing the lost viking and I need some help. I (somehow) managed to finally get to the skeleton and the helmet! but it keeps on going until it says goals incomplete. I tried walking in circles around it but it acts as if I’m just standing in the middle of nowhere! do I need to type in hero.pickupshinyhelmetrightinfrontofme? please help
Are you sure it doesn’t work? it works perfectly for me. Post a screenshot.
12_3
September 9, 2018, 3:06am
18
Are you supposed to get to the outside of the forest?
You aren’t supposed to go out of the forest…
hm idk
12_3
September 9, 2018, 3:25am
20
You completed it and got the “Arcane Knowledge” right? Is it worth it?