Hi guys, I have another question which would help me a lot if answered. XD
If a Unit in a Unit Group dies, does it remain in the unit group? If the unit is removed from the unit group, how is the unit order in the unit group change?
Say I add a zergling to Unit Group "X", he is now Unit 1 in Unit Group "X", then I add a roach to Unit Group "X", he is now unit 2 of Unit Group "X".
Say the zergling dies, is he removed from the unit group?
If the zergling IS removed from Unit Group "X", does the roach take the place of Unit 1 of Unit Group "X" which the zergling left available?
If the zergling is NOT removed from the unit group, would adding too many units to a unit group cause lag (Requiring me to manually remove units who die from a unit group?
I need information on this so that I can try and experiment with unit group manipulation (To simulate organized AI for small groups of nonplayer units, say a group of 3 roaches).
If a Unit in a Unit Group dies, does it remain in the unit group? If the unit is removed from the unit group, how is the unit order in the unit group change?
It does remain in the unit group, but it's considered "dead" WHILE it's revivable. Most actions using a unit group ignore the dead units (i.e. issue order to unit group). So if a unit is not revivable, it won't be stored in the unit group as "dead." In a more general context, dead units are removed from the unit group.
Say the zergling dies, is he removed from the unit group? If the zergling IS removed from Unit Group "X", does the roach take the place of Unit 1 of Unit Group "X" which the zergling left available?
Unless a unit is revived immediately, the remaining units in the unit group behind it will fill in the place of the fallen ling. (There's always a consecutively numbered chain of units in the unit group [there can't be gaps]). When it is revived, only if not immediately, it will be added to the next available slot in the unit group (at the end).
If the zergling is NOT removed from the unit group, would adding too many units to a unit group cause lag (Requiring me to manually remove units who die from a unit group?
This would only apply if the units are revivable. They're not even given a number in the unit group. So it's not necessary. I'd imagine the only purpose of them remaining in the unit group is for revives. Like, when a unit is revived that was in a unit group, it gets re-added to the unit group and given a number, the next available one. I believe there'd be a "pool" for each unit group that includes the dead units. They'd simply be a separate group of the revivable dead units within the unit group that when revive, are added to the real unit group (storage, basically).
Other nifty facts about unit groups:
Picking each unit in a region picks the units from left to right. So if you add all the units in a region to a unit group, they'll be added in the order in which they are from the left.
Hypothetically, since all units are revivable immediately, there's an instance in time than all units are stored as dead units unit the unit group when they die.
Thank you for the detailed response (You're so knowledgeable and wise D: ), I really appreciate it.
The rules you just posted seem to work perfectly for what I had in mind for my monster map. (Basically units belonging to the same player but belonging to two different unit groups, each unit group fighting the other unit group as if hostile towards one another.
I managed to make it work (1 trigger for each unit group, and 1 trigger to enable hostility), I made units from the same player fight each other with 3 triggers.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi guys, I have another question which would help me a lot if answered. XD
If a Unit in a Unit Group dies, does it remain in the unit group? If the unit is removed from the unit group, how is the unit order in the unit group change?
Say I add a zergling to Unit Group "X", he is now Unit 1 in Unit Group "X", then I add a roach to Unit Group "X", he is now unit 2 of Unit Group "X".
Say the zergling dies, is he removed from the unit group?
If the zergling IS removed from Unit Group "X", does the roach take the place of Unit 1 of Unit Group "X" which the zergling left available?
If the zergling is NOT removed from the unit group, would adding too many units to a unit group cause lag (Requiring me to manually remove units who die from a unit group?
I need information on this so that I can try and experiment with unit group manipulation (To simulate organized AI for small groups of nonplayer units, say a group of 3 roaches).
@wisesquirrel: Go
If a Unit in a Unit Group dies, does it remain in the unit group? If the unit is removed from the unit group, how is the unit order in the unit group change?
It does remain in the unit group, but it's considered "dead" WHILE it's revivable. Most actions using a unit group ignore the dead units (i.e. issue order to unit group). So if a unit is not revivable, it won't be stored in the unit group as "dead." In a more general context, dead units are removed from the unit group.
Say the zergling dies, is he removed from the unit group? If the zergling IS removed from Unit Group "X", does the roach take the place of Unit 1 of Unit Group "X" which the zergling left available?
Unless a unit is revived immediately, the remaining units in the unit group behind it will fill in the place of the fallen ling. (There's always a consecutively numbered chain of units in the unit group [there can't be gaps]). When it is revived, only if not immediately, it will be added to the next available slot in the unit group (at the end).
If the zergling is NOT removed from the unit group, would adding too many units to a unit group cause lag (Requiring me to manually remove units who die from a unit group?
This would only apply if the units are revivable. They're not even given a number in the unit group. So it's not necessary. I'd imagine the only purpose of them remaining in the unit group is for revives. Like, when a unit is revived that was in a unit group, it gets re-added to the unit group and given a number, the next available one. I believe there'd be a "pool" for each unit group that includes the dead units. They'd simply be a separate group of the revivable dead units within the unit group that when revive, are added to the real unit group (storage, basically).
Other nifty facts about unit groups:
Picking each unit in a region picks the units from left to right. So if you add all the units in a region to a unit group, they'll be added in the order in which they are from the left.
Hypothetically, since all units are revivable immediately, there's an instance in time than all units are stored as dead units unit the unit group when they die.
Thank you for the detailed response (You're so knowledgeable and wise D: ), I really appreciate it.
The rules you just posted seem to work perfectly for what I had in mind for my monster map. (Basically units belonging to the same player but belonging to two different unit groups, each unit group fighting the other unit group as if hostile towards one another.
I managed to make it work (1 trigger for each unit group, and 1 trigger to enable hostility), I made units from the same player fight each other with 3 triggers.