Ok so I dont use javascript but I think I can give you the general idea.
- Make a for loop in your spirit
while True:
- Loop through all enemies
distance = 999999
nearest = None
- If the
spirit.distanceTo(enemy)
is less than distance
distance = spirit.distance to enemy
- Nearest = enemy
- if nearest
- if nearest.x == insert a tower distance here.
- if nearest.y == insert same towers y
- Make the spirit move to a point close to the tower
- flare the enemy
(sorry about the late response)
cmon bro reply coco keep saying your replying
okkkkkkk i got it (who else hates 20 chars)
Give me 30. I think I can help a bit more.
1 Like
wdym give me 30 (like mins to make a post or smth?)
30 minutes becase I have to brush and stuff.
ah ok
(204389057920752842023582728 chars)
Ok so the cords of the top tower: x = 80 and y = 65. Mid tower cords: x = 75 y = 40. Bottom tower cords: x = 80 y = 15. Base tower cords: x = 95 y = 40.
Add a if statement to check the position of the tower so you can make your spirit move to different points for different towers.
And you dont really need the if spirit.isReady("flare")
. Add "Base"
to the enemy.type.
huh it doesnt work 200000 chars
I have 200 wins and 0 losses and I am still only 4th in the world. 

The score on the leader-board doesn’t reflect your wins and losses perfectly; having low score in the past reduces your growth; Simulating a lot of games even if you have lots of losses will artificially raise your score; etc
Ohhh. Ok makes sense. Thanks
Things that drive you nuts the most in Snowhold.
- Making a code that can beat the top 10 guys but loosing to a rank 100th guy
- Making a code that seems horrible but submiting it anywas and finding out its really good.
My flare code kinda started that way (the second option), it seemed like a dumb idea but I ran it against a lot of people and it worked really well.
And now litteraly everyone does it.
srry 20 charsssssssssssssssss