Hi!
I cant complete the Odd Sandstorm level, because the humans died at the end of the level. Thats because the yaks are so agressive. The yaks kills my humans.
What to do?
Hi!
I cant complete the Odd Sandstorm level, because the humans died at the end of the level. Thats because the yaks are so agressive. The yaks kills my humans.
What to do?
Can you please post your code?
@PythonProfessor It works for me. I can give you a couple hints:
First, kill of all the enemies in âeverybodyâ using a loop
Next, have your hero move to the oasis.
Then, loop through âeverbodyâ and use everybody[index] to possess an object, then command it to move to your heroâs position.
everybody = [âYetuâ, âTabithaâ, âRashaâ, âMaxâ, âYazulâ, âToddâ]
enemyIndex = 0
while enemyIndex < len(everybody):
# Use square brackets to get the ogre name from the array.
ogre = everybody[enemyIndex]
# Attack using the variable holding the ogre name.
hero.attack(ogre)
# Increment by 2 to skip over friends.
enemyIndex += 2
hero.moveXY(36, 53)
Was that supposed to be there?
How is that being used in the code.
I think the code wasnât the problem. Its work perfectly. I kill the goblins, and move to the red X, but in my way, the yakd attack me and the peasants.
What you did is correct and the same as what I did. After the hero moves, I command use a loop and state the index.
Then, I use:
enemyIndex2 = 1;
while(enemyIndex2 < len(everybody)):
everbody[enemyIndex2].move(hero.pos)
enemyIndex2 += 2
it wasnât work, i cant reach the red X, because the yaks knock back
Send a screenshot because it does not happen to me
The spell accidentally hits the yak. Try using a melee unit (warrior) such as the 4 you get at the beginning to ensure you donât splash onto yaks
I tried and it works! Thank you!
No problem Please edit your title to say [SOLVED] Odd Sandstorm yak problem