Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

[SOLVED]Help with Circumference of Yaks

So i know im so bad at this game lmao cant even do 1 level correctly
So this is my code, I pretty much just moved to the other x and change a little the code and thats it
Dont know why it dosent work

# Calculate the circumference of yak circles.

# The first yak circle.
yak1 = hero.findNearestEnemy()
# The distance to the yak is the radius.
radius1 = hero.distanceTo(yak1)
# The circumference is calculated the following way:
circumference1 = 2 * Math.PI * radius1
# Let's say the result.

# Move to the next mark.
hero.moveXY(60, 35)
# Find an yak from the second circle.
yak2 = hero.findNearestEnemy()
# Find the radius of the second circle.
radius2 = hero.distanceTo(yak2)
# Calculate the circumference of the second circle:
circumference2 = -2 * Math.PI * radius2
# Say the result.

Try subtracting 1 from the pos.y in your move statement…35 is not quite on the mark. Also, your second circum formula is multiplying by -2 (negative two).

thx just solved it! 20

1 Like