Capture Their Flag help

I can’t seem to be able to capture a flag no matter what. Can anyone help?
(Here’s my code:

while True:
    friends = hero.findFriends()
    friend = hero.findNearest(friends)
    flag = hero.findEnemyFlags()
    enemies = hero.findEnemyFlags()
    nearest = hero.findNearest(enemies)
    if nearest:
        hero.move(nearest.pos)
        if hero.distanceTo(nearest) <= 3:
            hero.captureFlag(flag)
            hero.moveXY(43, 60)
    if flag:
        hero.placeFlag(friend.pos)```
)
1 Like

This is a Multiplayer level right?

Also, can I see your gear?

And these are not even needed.

Also, flags are restricted in this level.

I’m talking about the flags you capture. How do you capture a flag?
(The command doesn’t work)

1 Like

go to endgame gems help (But now I have a paladin ring)

1 Like

You would move like the following: hero.move(enemyFlag.pos)

but you would need to define enemyFlag.

Yeah. I’m also talking about when you do get to the flag, how do you capture it? (hero.captureflag() doesn’t work for me)

1 Like

Did the hints tell you to use that command? I think the way i did it worked. Let me go and check.

Yeah, you are trying to use commands for the Flags that we can’t use in our gear.

Okay, I am going to call in some people who have beaten this level to try and help you. Since, my newer code is a complete failure. @abc and @MarmiteOnToast Could you try to help Bolt_coy out please.