I need help on Siege of Stonehold

help plz :frowning: :

# Help your friends beat the minions that Thoktar sends against you.
# You'll need great equipment and strategy to win.
# Flags might help, but it's up to you–be creative!
# There is a doctor behind the fence. Move to the X to get healed!
while True:
    flag = hero.findFlag("black")
    hero.pickUpFlag(black)
    hero.buildXY("fire-trap", flag.pos.x, flag.pos.y)
 

Ok ok just please stop spamming, for me I attacked try using a attack weapon not a hammer.

What is your error? Or are you just not passing the level?

You have a strategy of building fire-traps, so can you build fire traps? And

This should be in an if statement checking if the flag exists.
And please show your equipment.
Lydia

i did try hero.findflag but it did notting

Also if you are still gonna use the hammer, build the fire trap first then pick up the flag.

i’m using a weapon now

hello?

Just post your code I’ll be watching.


while True:
    hero.buildXY("fire-trap", flag.pos.x, flag.pos.y)
    flag = hero.findFlag("green")
    hero.pickUpFlag(flag)

its just to hard :frowning:

Ok, are you using a sword? If not then first you your flag = hero.findFlag line infront of your build one and after you do that check if the flag igsist.

im using a sword

You can’t build with a sword.

i just swiched

should i send a link?

For what?
20202020202020

i was just asking if i should

Send a link for what?

bec for me this is imposable

link to the codecombat level