How To Use Turn Number

So, this may be a little dim witted of me, but I can’t figure out how to use the turn_number in the deploy_attackers function. I want to make EMPs deploy every other turn, and I tried saying:

if game_state.turn_number % 2 == 1:

But this makes it so the EMPs are never deployed. It may be a simple concept, but I can’t quite get it to work. Is their some kind of specific formatting I need?

Looks okay to me, I am using the exact same bit of code (though I’m comparing to 0, which is effectively the same, just different starting turn). I would double check that your EMP deployment works without that check.

Ok, thanks. I’ll try to find the problem.

May just be that the game is skipping over those frames. I’ve noticed that it does that sometimes. But you could be spawning a lot of attackers before that and therefore those drains the bits you use before EMPs can be deployed

@Lazergurka

When ‘skipping frames’ is mentioned, it is in reference to the visual representation of the game you see in the playground or in replays. On high speeds, some frames are skipped, similar to the way fast forward works in a movie. Player turns should never be skipped, and we have no reason to believe this is currently happening. However, if you believe that this is not a miss-communication and turns are being skipped, we will investigate and fix it ASAP if you create a forum post describing the symptoms you are experiancing

3 Likes