Lost Viking Lost Viking Javascript help?

I have no idea how to even start the level. I read the hints and everything and I’m still lost I don’t even know where to start. If someone could help me get through it or guide me, thanks.

Use Search here is a lot
themes about Lost Viking

copy paste of myself

switch - manage hero.pos.y

sideSteps++
until switch, then
sideSteps–
until switch, then
sideSteps++
until switch, then
sideSteps–
etc

skip - manage hero.pos.y, relative current switch

sideSteps++
sideSteps++
or
sideSteps–
sideSteps–

slide - manage hero.pos.y, limiter

sideSteps > slide
reset sideSteps to the 1
sideSteps < 1
reset sideSteps to the slide

We need

  1. mechanism to Switch between sideStep++ and sideStep–
  2. mechanism to execute Skip regarding current Switch
  3. limiter for max and min sideStep

While copying code of others is frowned upon, i don’t suppose it’s against the rules. My recommendation would be to continue on with levels, come back to it once you have a better grasp of coding. It’s not a required level to complete to move on

1 Like

My advice for this is to understand the modules operator “%” and to keep checking what step your on so you know when to side step or skip. A tip for you is that I ran into the problem where when I was skipping I ended up going right off the map. Make sure you know where you will be ahead of time before you move.