Good day everyone,
I’ve been bashing my head at this for a while to no avail. (multiplayer setup) My characters have a healthbar widget on top of their heads, what I want to do is that for the owning player, that healthbar is green, for allies, you see it as blue and for enemies as red. Naturally other players see themselves in green, their allies blue and enemies red.
I setup a teamID for each player state, but the problem I ran into was that when I was trying to get controller index 0, it worked for clients, but not for the server-client thats hosting.
Because of that im not able to properly compare whether the healthbar the server-client is seeing belong to itself or to another player.
And another issue I ran into was that player can join at different times in the game, and I didnt know how to make this logic retroactive so that new players see the ones that are already in the map correctly as allies or as enemies.
If my approach is wrong please tell me how you’d do it instead
Thank you