Since the HotS patch, units loaded into a Bunker are removed from the Control Group they were in.
Any ideas how to solve this, so that when a unit is unloaded it remains in its control group? If I have to, I'll write a trigger that fires when a unit is unloaded, but I feel like there should be a more simple solution.
For example, if you load a unit and immediately unload it, is it the same as if you load a unit, add another unit to the control group, and then unload it?
EDIT: It looks the issue is related to the trigger action "Add unit to control group". I have a trigger which periodically spawns and adds units to a control group. If I remove the "Add unit to control group" line, correct behavior of the units is restored...
Interesting. I've heard others complain about this bug so it must be commonplace despite being caused by triggers. Are you saying that loaded units are removed from control groups into which triggers add other units? Or does simply calling the Add unit to control group action on ANY control group cause all control groups to forget their loaded units?
My thought is that the internal code for adding a unit to a control group probably collects the current control group's non-hidden units as a unit group, adds the new unit to the unit group, and then saves the unit group as the control group.
Are you saying that loaded units are removed from control groups into which triggers add other units?
Yes, this.
For example, let's say 10 Marines are in control group 1. I load them into a Bunker, and 4 of them enter. Now, let's say my periodic trigger fires (which runs every second or so); this now spawns a Marine and adds that unit to control group 1. Finally, I unload the Bunker...only 7 of the 11 Marines will be in control group 1, and the 4 that were in the Bunker were removed.
I'm confident that it's during the action "Add unit to control group" in which units currently loaded into a Bunker, or even a transport for that matter, are removed from the target control group. In my map, units in control groups other than 1 may load/unload and remain in their control group without issue, because my periodic trigger only affects units in control group 1.
Prior to 2.0.4, the trigger worked fine, which leads me to believe this is an editor bug.
Yeah definitely looks like a bug in SC2 itself, not your map. The control group triggers are pretty buggy in general. I've run into some ridiculous stuff there myself. The best you can do is a trigger workaround that re-adds the units, but I won't be surprised if you discover other bugs in the process.
Since the HotS patch, units loaded into a Bunker are removed from the Control Group they were in.
Any ideas how to solve this, so that when a unit is unloaded it remains in its control group? If I have to, I'll write a trigger that fires when a unit is unloaded, but I feel like there should be a more simple solution.
Thanks!
If this only happens with bunkers and no other cargo loaders, then I would check the bunker's Load ability, its Flags specifically but who knows.
@zorbotron: Go
Doesn't just happen to Bunkers, any transport as well.
Does it always happen, or are there exceptions?
For example, if you load a unit and immediately unload it, is it the same as if you load a unit, add another unit to the control group, and then unload it?
@TrenchaunT: Go
Yes, always happens, no exceptions I'm aware of.
EDIT: It looks the issue is related to the trigger action "Add unit to control group". I have a trigger which periodically spawns and adds units to a control group. If I remove the "Add unit to control group" line, correct behavior of the units is restored...
This might actually be an editor bug.
Interesting. I've heard others complain about this bug so it must be commonplace despite being caused by triggers. Are you saying that loaded units are removed from control groups into which triggers add other units? Or does simply calling the Add unit to control group action on ANY control group cause all control groups to forget their loaded units?
My thought is that the internal code for adding a unit to a control group probably collects the current control group's non-hidden units as a unit group, adds the new unit to the unit group, and then saves the unit group as the control group.
Yes, this.
For example, let's say 10 Marines are in control group 1. I load them into a Bunker, and 4 of them enter. Now, let's say my periodic trigger fires (which runs every second or so); this now spawns a Marine and adds that unit to control group 1. Finally, I unload the Bunker...only 7 of the 11 Marines will be in control group 1, and the 4 that were in the Bunker were removed.
I'm confident that it's during the action "Add unit to control group" in which units currently loaded into a Bunker, or even a transport for that matter, are removed from the target control group. In my map, units in control groups other than 1 may load/unload and remain in their control group without issue, because my periodic trigger only affects units in control group 1.
Prior to 2.0.4, the trigger worked fine, which leads me to believe this is an editor bug.
Yeah definitely looks like a bug in SC2 itself, not your map. The control group triggers are pretty buggy in general. I've run into some ridiculous stuff there myself. The best you can do is a trigger workaround that re-adds the units, but I won't be surprised if you discover other bugs in the process.
@TrenchaunT: Go
Out of curiosity, is there a good place I can report this bug to Blizzard?