Hey there. Can somebody tell me how to give a player a unique ID/index as an integer in my GameInstance?
Would you want to give it its own personal tag without using the default tag system? If so, you can maybe create an integer variable in your GameInstance and we’ll call that ID. And you can have another integer variable in your player called ID as well. If you want to have multiple players and you want to keep track of them in your game instance, you can have an array of integer IDs and just add each of the players to the array and you can identify them using their ID. Let me know if that helps solve anything or if you need another solution idea!
Hello @Zapking9224 Zapking and thank you for the reply. What I am trying to do is make my AI understand which player to kill for example. When the AI attacks the player, I used to cast to Main Character BP with Player Character index being 0. Now I am switching over to multiplayer and I somehow have to identify the player to the AI.