Deadly Pursuit Help

Hi everyone. I`m having trouble with the level Deadly Pursuit :frowning: . Please help!!
Heres my code code:

loop:
    flag = self.findFlag()
    if flag:
        position = flag.pos
        fx = position.x
        fy = position.y
        self.buildXY("fence", 26, 55)
        self.buildXY("fence", 35, 79)
        self.buildXY("fence", 41, 45)
        self.buildXY("fence", 51, 83)
        self.buildXY("fence", 56, 55)
        self.buildXY("fence", 67, 79)
        self.buildXY("fence", 72, 55)
        self.buildXY("fence", 84, 79)
        self.buildXY("fence", 88, 48)
        self.buildXY("fence", 99, 79)
        self.buildXY("fence", 105, 56)
        self.buildXY("fence", 115, 79)
        self.buildXY("fence", 123, 57)
        self.pickUpFlag(flag)
    
    else:
        item = self.findNearestItem()
        if item:
            itemPos = item.pos
            itemX = itemPos.x
            itemY = itemPos.y
            self.moveXY(itemX, itemY)

Hope this gives you a hint of what might be wrong :neutral_face:

Not really. Like I have said numerous times before, phrases like “I need help!” or “This code doesn’t work!” don’t help us solve you problem. We need more information.

However, here’s what I can see:

Your job is to use traps to kill the ogres, not fence them in. Also, I believe the idea is to make you build one thing whenever a flag exists. You just build the entire batch of fences with one flag.

It keeps saying, “ran out of time.”

EDIT: I fixed it by setting fire-traps instead of fences. Thanks @ChronistGilver for the help :sweat_smile: :sweat_smile:

Might try to do the drop the flag techniques. That’s how I completed the level. Also if you want to go fancy, try the ring of speed