How do I know what player index an instance of MyCharacter uses at runtime?
What is your setup? The Single Local Player Controller always is 0. If you have more Players playing local together they have Player Controllers with different indices. Do you want to get these controllers?
If you want to get the controller of a specific actor, you can use “Get Controller” instead of “Get Player Controller”.
And also, are you coding in c++ or using BP?
A few more information would be nice if you post a question.
Get Controller is probably what I was looking for.
Does UE4 support local LAN games, or is it all server/client?
I guess the question would be if I created a multiplayer game where each player is on there own PC/Tablet/etc… how do I know the correct controller to use? Or would it always be 0 in that case?
P.S. I can code both C++ or BP, it would depend on what I am doing at the time.
Great that is what I had thought.
Thanks for the help.
The index is for players at the same PC. Like having 4 Gamepads connected and assigning one to each player. Then you would have PlayerController 0-3.
If you have a Multiplayer Game with Server and Client, the Client only knows his own PlayerController with the Index 0. Only the Servers knows all controllers as far as i know :X but i could be wrong on that last thing.
Ok i will mark this question as resolved. If you have an issue, feel free to reopen it.