• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Need help reducing mass unit lags

Level 7
Joined
Sep 10, 2023
Messages
112
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:


  • 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?
 
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:


  • 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?
I don't know about trigger, but maybe this post can help you : Too many units in the map generates lag
 
Back
Top