Simple as that. If i try to call it from the Blueprint Editor it works, But if i try to call from c++ using the following code from my custom C++ Game Mode:
for (int PlayerId = 1; PlayerId < NumberOfPlayers; PlayerId++)
{
// Instantiate the new Controller.
APlayerController* NewPlayer = UGameplayStatics::CreatePlayer(GetWorld(), PlayerId, false);
}
Can i have your forum link for me to private message you?
If a change the false from:
APlayerController* NewPlayer = UGameplayStatics::CreatePlayer(GetWorld(), PlayerId, false);
to true…
APlayerController* NewPlayer = UGameplayStatics::CreatePlayer(GetWorld(), PlayerId, true);
it started working…
I wanted to spawn just the controller with no pawn. In a second moment i would determine which pawn it will be. Is this a expected behaviour for the function call?
I can perform some additional tests. Actually, go ahead and send me the code that you’re using so I can reproduce it on our end and then determine if there is an issue. Here is the forum link where you can send me a PM: https://forums.unrealengine.com/member.php?160394-Sean-Flint