After pressing TAB to select a sub-group within a group, F5 does not center on the sub-selected units or buildings, only a random unit/building in the whole super-group

Steps to reproduce:

  1. Build a building (eg barracks) on one side of the map (eg the far west)

  2. Build a different type of building (eg archery range) on the other side of the map (eg the far east, or a least a whole “screen” away).

  3. Add both the barracks, and the archery range, to control group 1.

  4. Scroll out of view of both the barracks and the archery range. Make sure they are NOT selected.

  5. Press 1, then press TAB, then press F5 (this is assuming default hotkey setup). You will go to a random building, but there is only a 50% chance that you will go to the building that has been sub-selected via TAB.

Please fix this, as (for example) giving commands, or setting gather points, only applies to the sub-selected via TAB units/buildings in a group, and not the whole group, so camera view should be consistent with this. Thank you :slight_smile:


Good catch. I suspect this bug could be related to something I already reported: The inability to use keyboard grid keys to activate secondary panel on selection groups that have mixed soldier types (i. e. archers + ele archers).

DEVS, please consider both when looking for solutions. Thank you.


Hey @jonpbc6a! Have you noticed if you always go to the building closest to your POV?

Just checked it now and it does go to the closest building, regardless of what the sub-selection is. This seems ok for when “ALL(Count)” is selected, but doesn’t seem right for when there is a sub-selection that you have tabbed through to. This is because A) Setting a gather point only sets it for the sub-selection, and B) issuing commands (eg move) only issues those commands to the sub-selection (both of which are what I would expect), so it is not consistent. The sub-selection should be treated as the real selection in all situations rather than just in some, imo.

(The story is different with units, as it goes to the middle of nowhere, but that is already reported as a known bug).

In addition, adding units to a control group ignores any sub-selection. Ie if you have a barracks and archery range selected, then tab through to the barracks, then press Shift+4, it adds both the archery range and barracks to control group 4. This doesn’t feel right either.

I don’t know what’s going on behind the scenes, but there are efficient tricks to keep track of min and max of some property of a group of things with O(log(n)) cost of adding / removing from the group (called “Order Statistics”, lesser known data structures) :slight_smile:

Thanks @jonpbc6a! Just wanted to make sure I was seeing the same thing. Appreciate the report, and the tip!