Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Help with "Lukers" code


This is my code, I don’t know what’s wrong.


The comment says to iterate over all enemies. However, you iterate over just three. That is not right. Additionally, you need to update enemyIndex no matter what type the enemy is.


if I put this code, he say to me that is wrong


Now my code is that, I don’t know how to update “enemyIndex”, and I think is for that reason because now he only attack yaks


It appears that on Line: 6 you have an exclamation point. Is this intentional?


Yes because if a put that the enemy.type is equal to shaman, he say to me that i’m creating an infinitite loop


On Line: 6 maybe you should try putting ‘:’ at the end.


i get it, but i don’t know how, i was changing something, and it works. Thank you


You’re welcome :grinning:


Looks like your incrementing enemyIndex now in the right place…