I really need some help for this one.
Here is my code:
type or paste code here
```# Use different colored flags to perform different tasks.
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.x)
# Pick up the flag!
hero.pickUpFlag(flagGreen)
# If there's a flagBlack...
if flagBlack:
# Build a "fire-trap" at flagBlack's position.
hero.buildXY("fire-trap", flagBlack.pos.x, flagBlack.pos.y)
# Pick up the flag!
hero.pickUpFlag(flagBlack)
# Move back to the center.
hero.moveXY(43, 31)
Oh wait never mind. I am all set.
1 Like
Did you figure it out
2 Likes
yes. I put two X positions. Thanks for asking!
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.