"Anti Gravity" discussions, tips & tricks, chatter

I wasn’t sure if you had all of the messages on watching.

1 Like

Or I should say, you had the chat being watched.

1 Like

how do i check a specific ball on a lane?

You can’t. You can only check for one lane at a time. Here is code that would check all of the lanes.

def checkForEnemies():
    lanes = [0, 1, 2, 3]
    for lane in lanes:
        enemies = hero.findEnemyUnits(lane)
        if enemies:
            return enemies, lane

while True:
    check = checkForEnemies()
    if check:
        enemies, lane = check
        hero.summon("orb", lane) 

Sorry, I didn’t tag you @NalfarCryptor.

does the code check all the lanes?

1 Like

I has a for loop that checks through all of the lanes and sends units to fight off enemy units. You could change what to send but other than that it will work. I tested it.

oh, what i wanted was basically it finds the ball on each lane and returns it

@Venneth sorry for the ping, but can u make the ball an actual object? i cant view its position and this error is happening

oof I dont know Java sorry


What are the chancess lol???

I think distanceTo should work with boulders, the problem is something else with your code

you can select the boulder on a lane by this way.

boulder = [b for b in hero.findBoulders() if b.lane == targetLane][0]
let boulder = hero.findBoulders().filter((b) => b.lane == targetLane)[0];

but boulder may not be there. this code will work.

boulder = [b for b in hero.findBoulders() if b.lane == targetLane]
boulder = boulder[0] if len(boulder) > 0 else None
let boulder = hero.findBoulders().filter((b) => b.lane == targetLane);
boulder = boulder.length > 0 ? boulder[0] : null;
1 Like

Can add findEnemyhero?

is not there hero.opponent ?

thankes! I didn’t see

1 Like

Lol lucky. I won the keyboard and headset last season but they just gave me a different headset and wireless earbuds. :frowning_face:

2 Likes

Hey @Venneth, when do you think that you will fix the bug that marks a win as a loss on various occasions? I see a loss and always check to see if it is a real loss or not.



Reached 7000 Points :crazy_face:

1 Like

I see you’re hiding, very smart indeed.

Imma copy your hiding strat now.