This is essentially the same as https://feedback.bistudio.com/T146461.
However, according to @BIS_fnc_KK, this is not a bug (but I still believe it is). So I'm going to re-post it as a feature request.
As mentioned before, the `combatMode` command is broken, unless you use `Group setCombatMode Mode`.
However, if the unit's combat mode was changed without that `setCombatMode` on the original gorup, the `combatMode` doesn't return the correct value.
There are two ways to reproduce the issue (see the** Steps To Reproduce** section)
The 1st method is the only way to change the combat mode of a selection of units (instead of the entire group) without using the vanilla commanding menus (I believe that the vanilla commanding menu uses the same trick too).
@BIS_fnc_KK
Regarding your comment:
>>! In T146461#1985469, @BIS_fnc_KK wrote:
> A combat mode of a unit depends on a combat of the group the unit is in, so in order to get combat mode of the unit you can get the combat mode of the current group the unit is in. When you move unit to another group, the unit behaviour is set by the new group, this is why combat mode you set on temp group won’t affect the unit in the new group. In short, "combatMode unit" does what you want already, returns combat mode the unit is subject to currently. I hope I made it clearer.
This does affect the unit. The unit's combat mode successfully changes (as indicated in the "group bar", as well as unit's behavior), but it can't be returned using `combatMode`. You can test it yourself if you don't believe me!
**TL;DR**, what I'm requesting is whatever changes the unit's combat mode in the group bar, i.e this one:
{F1862427}
Either the same command:
> //**combatMode** //unit
> return value: //Returns an individual unit's combat mode, not his group's (i.e. what is shown in the "group bar")//
or a new command:
> //**getCombatMode** //unit
> return value: //Returns an individual unit's combat mode, not his group's (i.e. what is shown in the "group bar")//