Download

get own player ID

Hi all…
I have this blueprint:
https://postimg.org/image/pfndbb75v/
Now my question… why my player ID is -1? It shouldnt be 0? The first player? I m controlling a pawn so i have to have a controller ID.

‘GetControllerID’ doesn’t have any input going into the ‘player’ pin. What are you trying to do?

if I understand your question right… I’d suggest using Get Player Pawn… using the (default) player index of 0 (self)… which will return a Pawn Object Reference…

i need that the player that use this attacks is immortal. I need to get the player controller ID of the player because all the player use the same character

if I can… I’d like to help, but I’m not quite sure what you are planning to achieve

Yep, I have the same problem. If I pick one of the two models, its chooses first ID (0), but If I change ID manually inside the level blueprint to (1) its switches hud, stats and other options to the second character. I was trying to [set the controller ID] for the picked character, but inside the level blueprint model loosing pawn connection, I think its should be some additional code to the game_player_controller or a game_mode or a game_pawn !

ID 0 is always the local controller if you don’t use splitscreen. If you want your local player to posses a different pawn make a ‘Get Player Controller[0]’ node, then drag off the Controller pin to create a ‘Unpossess’ node, then a ‘Possess’ and give that the pawn you want to control.

If i need another player controller, how i have to do? I m usign a server client model. I need to take the player controller ID of a client.

salm here is my actual description of a problem I have answers.unrealengine.com/questions/758408/switch-pawn-and-stats-of-a-different-models-on-eve copy link and add .html at the end to see it
I can switch id by the hands, what do u mean Unpossess and after Possess ? I can’t replicate an ID from Switch on Int ] , I have a variable PalyerID inside the map blueprint, but I can’t replicate it on a previous map level blueprints because its inside the map blueprint… I think its impossible to switch it without C++ there is no way to do it in a blueprints

Actually I did it by adding a different levels for each of character with a Branch True and False variables for both of a characters. So for Model 01 its gonna be level 01 and for Model 02 its gonna be level 02

But, I think it was a big mistake to replicate models hud widget inside the level blueprint !