Help on Python level "Interception"


I really don’t know what to do to solve this, can someone please help?

Hello,

The error message says that moveXY requires 2 numbers, but you’re passing a string in.

Do you know the difference between a string and a number?

Don’t put quotes around variable names.

Hi, I tried unquoting the variable but this is what happened:

Replace "Arrow tower" with enemy.
There is only one enemy in this level (the arrow tower), so the enemy variable references the arrow tower. :slight_smile:

I’m really sorry, but i just can’t seem to complete this level! :confused:

We are making progress, don’t worry! :smile:

Your code is trying to access x and y properties directly in the unit object, which don’t exist there. The x and y properties belong to the unit’s pos property. You need to change enemy.x to enemy.pos.x, likewise for the y property and the hero’s position properties as well.

Thankyou! It finally worked!

This confused me with arrow tower but when I put in enemy, it worked

Thankyou so much!

I struggled with my code on this level, but now I got it!

Thanks again!