"Hotseat" local multiplayer - basic setup

I’m having a hard time figuring out how to make a controller/player setup for a turn based local multiplayer game, similar to Heroes of Might and Magic, in blueprints.

Aim

  • In short, multiple human players (and AIs) taking turn in controlling their set of pawns.
  • I’d like to use classes like Player and Player State to be able to later add online multiplayer as well, without major rewrite.

My attempt

When I’m making multiple Players (Create Player node) to get Player State for each (to hold player data), I’m getting multiple controllers as well. That’s working fine, but when I try to switch Controller ID to pass the controls of keyboard and mouse (ID 0), the engine crashes. I tried setting the previous controller to -1 to avoid both having 0, but that didn’t help, still crashes.

Using one controller?

So I’m thinking that maybe I should use just one Player Controller (ID 0), and only switch Player States. But I’m not finding a way to change the State at runtime, in blueprints. Is it even possible? Or where else should I keep the data for each player, so it’s easy to be replicated, later on when I try adding online play.

Thanks for any advice.

I guess I have figured it out. You have to create the player controllers for the engine to also create player states, but simpley don’t use them.
Save references just the player states and inside them have references to all pawns of each player.
Possess all pawns with controller 0 and make the switching logic based on just the currently active player state. (Using custom logic for switching, in game mode)

Hi, I’m looking to have a gathering at home and I would like to setup 4 racing wheels in order to compete in the local multiplayer split screen mode. How can I setup the controler for each player? I don’t see any of the player 1, player 2, player 3 and player 4 input configuration.

Any link or video explaining how to be able to play 4 player without being forced to buy windows compatible controls?

Best regards,

Dave