It would only work for the player-controlled faction. The AI doesn't use the UI.

If you post your code, I'll look over it.