Interception HELP

I really need help I just cannot keep this ONE peasant alive.

1 Like
while True:
    enemy = hero.findNearestEnemy()
    friend = hero.findNearestFriend()
    # Calculate x by adding friend.pos.x to enemy.pos.x
    # Then divide by 2.
    # Check the guide if you need more help!
    x = ("tower".pos.x + peasant.pos.x) / 2
    # Now do the same for y
    y = ("tower".pos.y + peasant.pos.y) / 2
    # Move to the x and y coordinates you calculated.
   
1 Like

1 Like

It says X Is not difine.

1 Like

can you give the link?

Try to write if enemy: and then write enemy.pos.x/enemy.pos.y without "".

Link? link for what?

1 Like

uhh the link for the level…

but first try what @PeterPalov said

It now says peasant is not define.

1 Like

1 Like

oops sry about that…

1 Like

If this helps, It is in the sarven desert

1 Like

ok let me check…

It is like one of the first 20…

1 Like

uhh sorry I cant check it I am not a subscriber…

:open_mouth: :open_mouth: :open_mouth: :frowning_face: :frowning_face: :frowning_face: :sob: :sob: :sob:

1 Like

Well I dont know python either but do you have to define x?

@Deadpool198 or @Eric_Tang could you please help?

Wait what language do you do?

1 Like