My map has one barracks unit type that can train all units, but on MapInit all units are made unavailable for all players, and then, after 0.01s, a trigger goes through each player and makes training of certain units available.
The problem is that after certain events such as a player leaving, all other players on that player's team gain Fully Shared control over that player. When that happens, they can train every single unit the barracks can train, even if it is unavailable to both them and the leaving player.
Q1: How can it be prevented that giving Fully Shared control allows the training of all unavailable units, and only allows training of units that would be available to the player giving Fully Shared control? Without making more barracks unit types, that is.
The problem is that after certain events such as a player leaving, all other players on that player's team gain Fully Shared control over that player. When that happens, they can train every single unit the barracks can train, even if it is unavailable to both them and the leaving player.
Q1: How can it be prevented that giving Fully Shared control allows the training of all unavailable units, and only allows training of units that would be available to the player giving Fully Shared control? Without making more barracks unit types, that is.