Tundra tower help/problem

In tundra tower, my guardian suddenly freezes when no enemies are around. When they are around it stays that way, can someone help?

Here’s my code for that part

if enemy and distance < 60:

Nvm I think it’s a problem with distance cause removed distance and it’s working fine now

It’s hero.distanceTo(enemy), for future references.

no, it’s guard.distanceTo(enemy), remember it’s Tundra Tower.

1 Like

oh I did hero.distanceTo(enemy) so it didn’t work, ty

Oh right I frgt abt that

what shall I code if the opponent has teleported enemies to your base and you want to teleport it back at that exact time. Please could you be so kind to help.
I have been struggling on this code for the past 2 days

Hey Moonwatcher348,
I wanted to develop a code in Tundra Tower that can teleport enemies back if they have just recently been teleported from the enemy side at the end x and y coordinates. How would i be able to do that?


for (let effect of hero.findActiveAnomalies()) {
    if (effect.name === 'teleport') {
        if (hero.isReady('teleport')) hero.special('teleport', effect.endX, effect.endY);


for effect in hero.findActiveAnomalies():
    if effect.name is 'teleport':
        if hero.isReady('teleport'):
            hero.special('teleport', effect.endX, effect.endY);

(if the Python doesn’t work replace is with ==)

doesn’t work sadly :c

Same it does not work!

It works. At least the javascript does.

Teleport works on a cooldown. If you are in that cooldown, then you wont be able to teleport enemies back.

I mean I had to move a line down for one of the commands for it to work, but the code itself when put into the proper placement works very well.

1 Like

You have to put it in a while true loop

still doesn’t work : ( @moonwatcher348

Works for me :] (20 chars verifies)

Ok it’s working now but for some reason, none of my other effects are working or my yetis are just standing their

hero.on(spawn, guardAct) or something like that should be in your code. Can you make sure it is still there? Also, abilities act on a cooldown. If you want to use your abilities in that you’ll have to incroporate it into the while(true) loop.

hero.on("spawn-guard", defend), not hero.on("spawn", defend)