- Joined
- Jun 14, 2008
- Messages
- 176
Is it possible for one unit to be in multiple unit groups? If so, any exceptions ?
Does having a unit group variable "Set Unit Group Variable - Units in region" (for example) remove the affected unit from any other unit groups?
I have two problems:
1. Currently I have a trigger:
Event - Unit dies(I need the trigger to add the dead unit to the global group) > Action - Add triggering unit (dying unit) to [Global Unit Group 1]. (Yes I made sure the variable is a global group variable).
I also added an action which displays the number of units in the group every ime a unit dies so I know how many are in the group (that's how I can tell that there's an issue with the unit group)
Though for some reason the unit group keeps getting "reset", it never manages to get past 1 (well it does sometimes but then it gets reset back to 1). It seems every time the trigger runs, the unit group gets emptied.
I thought it may be because I had another trigger (which ran periodically) which set all units owned by the player to a unit group but I disabled it and the problem still occurs. Any other ideas?
2. I also had another weird issue with unit groups: I had a trigger which had a unit group in another unit group, example -
Set Unit Group 1 - Units in region.
Pick each unit in [Unit Group 1] and do actions:
--Set Unit Group 2 - Units in region (example).
--Pick each unit in [Unit Group 2] and do actions:
In this example of a trigger I had, the unit group stopped "looping"(which seems to be the case for SC2's unit groups as opposed to WC3), it only worked the first time then stopped after the the second unit group was being used.
Is this intended? Any explanation to why that happens?
Anyway any help, info, and/or explanations regarding Unit Groups and my issues with them will be appreciated, thanks.
Does having a unit group variable "Set Unit Group Variable - Units in region" (for example) remove the affected unit from any other unit groups?
I have two problems:
1. Currently I have a trigger:
Event - Unit dies(I need the trigger to add the dead unit to the global group) > Action - Add triggering unit (dying unit) to [Global Unit Group 1]. (Yes I made sure the variable is a global group variable).
I also added an action which displays the number of units in the group every ime a unit dies so I know how many are in the group (that's how I can tell that there's an issue with the unit group)
Though for some reason the unit group keeps getting "reset", it never manages to get past 1 (well it does sometimes but then it gets reset back to 1). It seems every time the trigger runs, the unit group gets emptied.
I thought it may be because I had another trigger (which ran periodically) which set all units owned by the player to a unit group but I disabled it and the problem still occurs. Any other ideas?
2. I also had another weird issue with unit groups: I had a trigger which had a unit group in another unit group, example -
Set Unit Group 1 - Units in region.
Pick each unit in [Unit Group 1] and do actions:
--Set Unit Group 2 - Units in region (example).
--Pick each unit in [Unit Group 2] and do actions:
In this example of a trigger I had, the unit group stopped "looping"(which seems to be the case for SC2's unit groups as opposed to WC3), it only worked the first time then stopped after the the second unit group was being used.
Is this intended? Any explanation to why that happens?
Anyway any help, info, and/or explanations regarding Unit Groups and my issues with them will be appreciated, thanks.