I’ve been trying this again after times of fail and reduction from my code
hopefully y’all can help me out find whats wrong with the problem in my code
while True:
flagGreen = hero.findFlag("green")
flagBlack = hero.findFlag("black")
# If there's a flagGreen...
if flagGreen:
# Build a "fence" at flagGreen's position.
hero.buildXY("fence", flagGreen.pos.x, flagGreen.pos.y)
hero.pickUpFlag("green")
# Pick up the flag!
# If there's a flagBlack...
if flagBlack:
hero.buildXY("fire-trap", flagBlack.pos.x, flagBlack.pos.y)
hero.pickUpFlag("black")
hero.moveXY(43, 31)