Hit and Freeze Python

PeterPalov I need help so plz send me the code

No, on this forum we can’t post solutions. We can just help people. Try to write your own code, then we can help you.

2 Likes

MunkeyShynes plz help me

No one can help you before you write a code.

2 Likes

Also, what do you mean?

2 Likes

Deadpool are you the leader or what I asked for help but no reply???
you must be the asistant leader right?
the leader must be someone or the other right???

But Leader can’t be on forum all day. Maybe he has night now.

2 Likes

Good, @wazi, like I said no one can post full solutions on this forum.

2 Likes

Hi @wazi, welcome to the forum. Yes, as Peterpalov rightly said, you must post your code so that we can help you. If you do it (and it requires very little effort) you’ll solve the level in no time, but we need to see the code!
This is how you post it:

Thanks
Danny

2 Likes

A leader is a trust level :slight_smile:

1 Like

Hey can somebody help me pass this level because my character is not even attacking.

def inAttackRange(enemy):
    distance = hero.findNearestEnemy()
    # Almost all swords have attack range of 3.
    if distance <= 3:
        return True
    else:
        return False

# Attack ogres only when they're within reach.
while True:
    # Find the nearest enemy and store it in a variable.
    enemy = hero.findNearestEnemy()  
    # Call inAttackRange(enemy), with the enemy as the argument
    # and save the result in the variable canAttack.
    if enemy:
        hero.canAttack = inAttackRange()
    # If the result stored in canAttack is True, then attack!
    hero.isReady("cleave")
    hero.cleave(enemy)
    pass

Never mind I figured it out.

Congrats on beating the level!

Mumbo_6

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.