[Solved] Mission Medical Attention Python

while True:
    enemy = hero.findNearestEnemy()
    currentHealth = hero.health
    healingThreshold = hero.maxHealth / 2
    # If your current health is less than the threshold,
    # move to the healing point and say, "heal me".
    # Otherwise, attack. You'll need to fight hard!
    if currentHealth < healingThreshold:
        hero.moveXY(65, 46)
        hero.say("heal me")

I finished the mission because my health is a lot and the standard guys hold out pretty good. But when i skip a few seconds i noticed that the guy does go back for the heal like it should. But he doesn’t attack?

never mind guys, fixed it with this code:

Mod edit: [Please don’t post successful solutions.]