Originally I wanted a map unit limit. Seems like thats impossible.
Now I would just like to know how to limit units owned by player X.
These units spawn from a vessel. So simply adding supply doesnt work.
I've tried a few triggers to no avail.
The biggest issue is I am not calling on a specific unit type. I am calling on all units owned by player.
So I can't just say Limit player to 200 Zergling.
Any help would be appreciated. Thanks!
how are you spawning them? using a trigger? every second create x units at x point?
just have a condition counting how many units of that type said player has, if over the limit dont spawn.
Originally I wanted a map unit limit. Seems like thats impossible.
Now I would just like to know how to limit units owned by player X. These units spawn from a vessel. So simply adding supply doesnt work. I've tried a few triggers to no avail.
The biggest issue is I am not calling on a specific unit type. I am calling on all units owned by player. So I can't just say Limit player to 200 Zergling. Any help would be appreciated. Thanks!
requirements? validators?
is it trigger based? have a condition.
Trigger based.
No conditions. Only to stop spawning units when player X has 200 units. Else - Do nothing.
how are you spawning them? using a trigger? every second create x units at x point?
just have a condition counting how many units of that type said player has, if over the limit dont spawn.
Every X seconds Create 1 X At location Variable
@PreTenD: Go
add the units to a unit group as they are created...
UnitGroupArray[0-15] use the index of the player the units are spawned for and add them as they are created,
You can then do counts on the number of units in these groups.... or do loops against the specific units in those groups.
I will test this in the morning. Thanks! :)
Ok. I probably did it wrong. Here is what I have.
Events:
Timer - Every 0.5 Seconds of Game Time.
Local variables
--Conditions
--Actions
Unit group - Add (Last created unit) to Unit limit.
Issuing the stop creating command.
Events:
Timer - Every 1.0 Seconds of Game Time
Local Variables
Conditions
(Number of living units in Unit Limit(0)) == 10
Actions
Unit - Kill (Last created unit) ................ also tried remove unit but to no avail.
The Variable has an array of 10.