Not sure why, but once you start throwing razor disks with the first flag, the hero keeps throwing them even if there isn’t a flag. This adds a lot of rogue disks that can potentially hit the ice yak a mess up your level. The only way I could get it to stop is add an else statement with a hero.say. To see if the code was seeing a flag, I added a hero.say after if flag and it wasn’t running through the code to trigger the function. I don’t use the flags a lot so I’m not sure if I’m missing something or not.
def throwDisk(target): hero.throwPos(target) hero.removeFlag(flag) while True: flag = hero.findFlag("green") if flag: throwDisk(flag.pos)
Adding to the post a while back, but specifically addressing this level.
Looks like this specific seed causes the error.