I am trying to use a menu widget to allow a user to choose between an AI vs P1 and P1 vs P2. I have attached a blueprint callable C++ function to each choice, but the function is not being called because I have a breakpoint in the function but the breakpoint is not being triggered. Any ideas as to why the function is not being called?
Here is my blueprint callable function:
void AMyProjectGameMode::SetVersusMode(int32 NumberHumanPlayers) {
if (NumberHumanPlayers < 2) {
// have AI possess right pawn
MyPlayer->SetPlayerTwoPawn(NULL);
EnemyPlayer->Possess(SecondPlayerPawn);
}
else {
// have PongPlayerController control the right pawn
EnemyPlayer->UnPossess();
MyPlayer->SetPlayerTwoPawn(SecondPlayerPawn);
}
}
Here is how I am calling the function: