Yak Rampage Flags not Coming

I am unable to clear Yak Rampage.

Flags are not coming. Is there any command so flags will come ?
Even findNearestEnemy is not retuning any value even though Yak are there…
Is there any command for putting flags,

Pl. guide. This is my first post and really looking forward to help.

while True:
    flag = hero.findFlag("green")
    if flag:

Welcome to the forum. Right here you don’t need that. Just put


Hi Eric_Tang
Thanks for quick reply.

Flags are not coming at all.

Oh, you have to submit it and place them.

Hi Eric_Tang
How to submit and place flag ?

You press the submit button then in the bottom left corner there should be things saying green purple black. Then you click the green one and tap the screen where you want to place the flag at.

Eric_Tang Thanks again for quick reply.
Able to put flags now.
my code

while True:
    flag = hero.findFlag("green")
    if flag:

Still not working ? Pl guide
What else is missing ?

With that code you should be able to complete the level,


Then is it only fast and accurate placement of flags ?

so look you gotta press submit look down at the bottom right corner and click the green flag and place it down where ever you think yaks cant get you and your hero moves there.

Well you dont have to complete them with flags but yes. The other way is with vectors which is pretty hard to do.

and keep placing down flag s the yaks can move and see you know.

and also you dont unlock vectors till glacier

Usage of flags should be pretty self-explanatory, but here’s a demo of completing Yak Rampage:

1 Like

Thanks for quick and lots of support.

Still Yaks are very fast. Not able to complete the level.

How to distract the yak with the pet.

could you post your code please?

while True:
    gflag = hero.findFlag("green")
    bflag = hero.findFlag("black")
    if bflag:
    if gflag:

without black flag also tried

Your not picking up your flags. Which means you won’t be going to your flag.

Well, I’m not exactly sure where you’re at in the maps of CodeCombat. If your ahead of me, then there might be another way where you don’t have to pick up flags :woman_shrugging:. But if you’re not, then I think you still need to pick up your flag.

One only remaining in Saven Desert.

what is the way to distract Yaks ? How blue fox can help in distracting ?