I don't know, a player can only retrieve the information of their own units. The engine doesn't provide the information of units not owned by the player. In order for this to work, the player would need to become a full-fletched observer. But the consequence of that is losing the ability to chat to their team
This is all of the top of my head, I'm always happily proven wrong.