I’m encountering an issue with my multiplayer game setup in Unreal Engine. Specifically, I’m having trouble using GetPlayerController(1)
to access the second player controller. The function GetPlayerController(0)
works perfectly for the first player, but when I try to use GetPlayerController(1)
, it returns None
, causing a runtime error.
Error Message:
PIE: Error: Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetPlayerController_ReturnValue_1". Node: Set View Target with Blend Graph: EventGraph Function: Execute Ubergraph BP Third Person Game Mode Blueprint: BP_ThirdPersonGameMode
Steps Taken:
- Used
Create Local Player
node to add a second player. - Attempted to use
GetPlayerController(1)
to access the second player controller. - Tried using C++ for the game mode, but the same issue persists.
- Ran the game as a listen server, but player 2 is still missing.
Despite these steps, the second player controller is not being recognized. This issue is affecting my entire multiplayer code, as many functions rely on accessing the second player controller.
Any insights or solutions to resolve this issue would be greatly appreciated!