So I have been trying to figure out for weeks now why I cant build anything or use my army units after playing a match for more than 2 hours. I know its a long time... Anyways I have the unit cap set to 2500 for each team and there are 2 teams total. I basically have it so that we have unlimited resources when were playing. After a while we get this error can't allocate units. Which prevents us from building more units and creating more structures. Whats worse is before this even occurs a lot of our army units lose the ability to do anything, like moving attacking and any other abilities. It's not all our units but a large amount of them. This inability to use our units really happens when were zerg even though the zerg team typically doesn't build that many structures. Am I reaching a limit with sc2 in terms of how many units can be made and why does it affect zerg the most? Is there a trigger i could create that would kill the units without any moves?
Thank you for anyone who could help. This issue has been happening for years but i recently have been trying to figure out at least why this happens and a way to fix it. My brother likes the massive battles so I'm trying not to reduce the unit cap but Im not sure what else to do.
It sounds like you simply have too many units, and I don't think you'll be able to just add more units in a game like SC2. Showing the units graphically, as well as complex computations like pathfinding take a lot of computer resources. One option would be to find a different game which supports larger armies.
An alternative option would be to do some sort of work around such as "banking" units. By this I mean you would have some sort of numeric representation of your units, but not actually have them on the field. Say you have 1000 zerglings, but only 100 are actually on the field. When one zergling on the field dies, a zergling is automatically spawned, and you deduct 1 from the bank.
Best way is with triggers. You could store the information using Integer variables. Every time a unit is created, or if you have set units already on the field, simply modify your variable in a global variable. You should use an array so that it corresponds to every player. You could have simple triggers that add or subtract to your global variable which would act as a counter to how many units you have.
A lot of board games do this sort of thing, such as Axis And Allies. They use red chips to basically act as 5 units, since the board game cannot accommodate dozens of units chips make it an easy way to have more units then they have plastic pieces for.