Apocalypse Level Glitching?

I’ve tried to finish this level three times today, and I’m pulling out my hair.

After painstakingly weaving my way through the bomb storm, and successfully surviving for 60sec, I click Submit. Those parts work.

But when I click Submit and it goes to play the finished product in a second window, the bomb pattern changes. And since the bombs are in different places, the path I coded doesn’t work and I die pretty immediately.

I don’t understand, is this supposed to happen? Did I miss something? Or is it a glitch?

Hitting the “Submit” button will always give the level a new random seed, so the firing pattern will be different every time you hit “Submit”, so coding to a specific pattern is no good.

Head on desk Okay. Thank you.

Use flags they might help

I’ve updated the default sample code comments to make note that the bomb pattern is randomized on submit; sorry about that!

I am having trouble understanding the move function. sometimes I can just put the flag.pos and my dude goes their, other times they don’t. I have the boots with the move function…

flagGreen = self.findFlag(“green”)
flagViolet = self.findFlag(“violet”)
flagBlack = self.findFlag(“black”)

loop:
if flagGreen:
self.move(flagGreen.pos)
self.pickUpFlag(flagGreen)

When I try this he won’t go get the flag. What am I missing?

sorry, just read how to format so code posts properly…

flagGreen = self.findFlag("green")
flagViolet = self.findFlag("violet")
flagBlack = self.findFlag("black")

loop:
    if flagGreen:
        self.move(flagGreen.pos)
        self.pickUpFlag(flagGreen)

You have the right idea, but you should put

flagGreen = self.findFlag("green")
flagViolet = self.findFlag("violet")
flagBlack = self.findFlag("black")

inside the loop; otherwise, your code will check for the flags only once.

1 Like