Hi,
I have been struggling to make a blueprint graph which could let me access the player’s number in a multiplayer LAN RTS game. What I am basically aiming for is a functionality making the actors distinguish which actions are done by which players. For example, a red actor should only listen to a Move Command given by Player 2 and Attack Command given by Player 3, whereas a green actor should only listen to Move Commands from Player 3 and Attack Commands from Player 1. What is the easiest way for the actors’ BPs to properly execute such idea?
As I haven’t managed to find a straightforward node of doing that I thought of some workarounds which do not work unfortunately.
One supposed solution I tried was to get the PlayerID with PlayerState on EventPostLogin in the GameMode BP and as each player that joins the server gets an ID=ID of previous player +1, I tweaked those values to get the players’ numbers. It somehow did not work and maybe that is a good thing since the ID method is not very reliable.
Any other ideas?