Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

Stillness in motion help

can someone plz help me with this too, I do not know what I’m doing wrong!


help me!

You only need the second hero.bash(enemy)

i fixed it but i still die. I do not know why?

Can you format it using this button </>

@Abelardus next time please post your formated code and not a screenshot.


I’m not sure what’s wrong with it other than you could have horrible armor.


you call this horrible armour?

while True:
    enemy = hero.findNearestEnemy()
    # If there is an enemy, then...
    if enemy:
        # Create a distance variable with distanceTo.
        distance = hero.distanceTo(enemy)
        # If the distance is less than 5 meters, then attack.
        if distance < 5:
        # Else (the enemy is far away), then shield.

Nope, much better than I have. And I still don’t know what wrong with your code.

never mind i got to finish it by chsnging the bash to `hero.move(X,Y)

thnanks for your help!`

1 Like

Great! Glad you finished! Can you check the solution box on any post please?

You were supposed to shield… but okay.

1 Like

Maybe instead of attacking and bashing u should throw

Hi this person is not active anymore please do not revive dead topics.