Topic for Solar Skirmish

oh it is cool! I can predict when the enemy will come to the place where I shoot arrows, and shoot arrows in advance
螢幕擷取畫面 2024-06-07 212729

I have been trying to do that but I keep missing. I will get it eventually.

1 Like

I also changed my overall strategy by the way.

1 Like

The speed of the water gun may depend on the hero’s speed

Well I can see where the opponent is and have the formula for the predicted pos.

predicted_opponent_x = hero.opponent.x + (hero.opponent.speed * distance_x)
predicted_opponent_y = hero.opponent.y + (hero.opponent.speed * distance_y)

But it doesn’t calculate correctly.

1 Like

Or I don’t shoot fast enough.

1 Like

What I wrote is quite complicated, but I’m still learning the exact speed.

1 Like

I think I’ve got it.

1 Like

Can anyone tell me what what it means,thanks!

It means your doing to many things. I believe the system will execute about 2 million statements before giving you that. It’s very annoying, I have had to deal with it in several arenas.

1 Like

Thank you, but I have calculated it and found that each step is only executed more than 1100 times. ( I’m not as strong as @Shininglice)
I am trying to figure out how to fix it.

each step can take more than one statement and if you are constantly checking things, it can add up very quickly

1 Like

Hey@Venneth, Can you take a look at hero.solarAtXY(x,y), if you look at it from your own point of view, there is no problem, but from the enemy’s point of view, you will see that the blue color is not -1, I did several experiments and found It is neither 1 nor 1 nor 0, since the battle can only be viewed from the enemy’s perspective, it cannot be printed, so there is no way to know what number the blue land is.Thanks
螢幕擷取畫面 2024-06-20 231507

I think this may not be a problem with hero.solarAtXY(x, y), because from my perspective, walking 8 steps up from the starting point will not hit the wall, but from the enemy’s perspective, it will


Tbf it isn’t. I’ve done it before in 0-11 age bracket and 9th overall. Just shininglice comes in and gets a 927392 line long code that uses the spot of a single tower to find your entire house

2 Likes

def shock():
if hero.distanceTo(hero.opponent) < 5:
hero.ability(“shockTrap”)
what wrong with this. I am trying to make it as simple as possible :smile:

1 Like

65-33=32 32/4=8(hero is red)
33-5=28 28/4=7(hero is blue)
so i can’t wight the same code with hero is red and hero is blue

Ya, you just have to add a condition that checks what color the hero is, and starts with 8 if the hero is red (and you want to go up), or 7 for blue if you wanted to go down.

1 Like

Can you help me to test hero.solarAtXY(x, y) I thinks It’s weird

I haven’t messed around with it much myself. I have no idea how it would fit in. I only know what it can do. I don’t know if I could be much help, but I can try.

1 Like