I really need help I just cannot keep this ONE peasant alive.
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.
It says X Is not difine.
can you give the link?
Try to write
if enemy: and then write enemy.pos.x/enemy.pos.y without
Link? link for what?
uhh the link for the level…
but first try what @PeterPalov said
It now says peasant is not define.
oops sry about that…
If this helps, It is in the sarven desert
ok let me check…
It is like one of the first 20…
uhh sorry I cant check it I am not a subscriber…
Well I dont know python either but do you have to define x?
Wait what language do you do?