I know that to reduce unit lag (when too many units move at the same time and get stuck), one common solution is to split units between multiple players, where a human player controls several computer players.
I’m having trouble implementing this with triggers. Specifically, I need to distribute 240 units across 6 players (40 units per player).
Player 1 (human) controls the other players, but only Player 1 is allowed to build the structure that spawns units (zombies with tiers from 1 to 4).
The idea is:
I managed to make this work when the unit count only increases, but once units start dying, the trigger stops working correctly.
Does anyone know how to handle this properly?
I’m having trouble implementing this with triggers. Specifically, I need to distribute 240 units across 6 players (40 units per player).
Player 1 (human) controls the other players, but only Player 1 is allowed to build the structure that spawns units (zombies with tiers from 1 to 4).
The idea is:
- When the total unit count reaches 40 or more, newly spawned units should belong to Player 2 (computer).
- When it reaches 80 or more, newly spawned units should belong to Player 3, and so on.
- If the unit count goes back down (because units are killed), newly spawned units should be assigned back to the previous players accordingly.
I managed to make this work when the unit count only increases, but once units start dying, the trigger stops working correctly.
Does anyone know how to handle this properly?
