Hello,
The SelectGroupForPlayerBJ JASS primitive (also available in GUI as Selection - select unit group for player) causes desync of a player whenever it is used.
I initially produced it with a complex map. But it is reproductible with a very basic new custom map : 2 players, 1 unit, 1 short test trigger as follow :
call Test Trigger
Events
Player - Player 1 (Red) types a chat message containing test as An exact match
Player - Player 2 (Blue) types a chat message containing test as An exact match
Conditions
Actions
Set VariableSet UG = (Units in (Playable map area)) // UG is a global variable of type Unit Group
Selection - Select UG for (Triggering player)
Custom script: call DestroyGroup(udg_UG) // To avoid memory leak
For ex: when player 1 types “test” at game start, player 2 gets desynchronized.
You can find such a test map to reproduce the issue in hiveworkshop, I named it “SelectGroupForPlayerBJ desync.w3m”.
I tried to add a call to “syncSelections()” primitive, it does not solve the issue.
Replacing the call by a for-loop that select units one by one is a valid bypass to the issue.