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?
@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)
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
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