How do multiple people control a single character?

I want 2 to 4 people to control a single character, but I haven’t figured out how to do that. For example, one person will take the character forward and the other will make him dash.

Hey @syntx!

Interesting thought. A single controller gets assigned to a character, so using a controller would be difficult.

What if you use the GameMode? You could have any actions on the character be assigned to CUSTOM events, and then on the GameMode have the various inputs sought out, possibly? If you can do that, you could just get your reference to the character, and AS that character Do CustomEvent.

Hope that helps!

1 Like

I imagine that each player will still have to have their own player-controller, this is how Unreal works in and of itself.

Past that, take the input on the server, as you normally would, then aggregate? Can you pass input directly into a PC on the server, eg: PlayerController 3 (in your example)?

Players 1 and 2 will be sending their inputs to the server via their controllers, but nothing remote connects to controller-3, only the server itself talks to it directly via what comes in from 1/2?

1 Like

Thank you for your answers, I will try what you said

each character could still have their own controller, but have those controllers be locked to follow another pawn so all of them are looking at that one, when a player controller’s pawn 1 presses a button ie w you send a message to server and server then tells the other character to move with w perhaps, similar idea for the others maybe? or would that not work?

1 Like

Agreed, it’s more that the-thing-on-the-server needs to be told what to do, and have it’s behavior replicated back to the players. It itself doesn’t necessarily need to be a player-thing, just something they can all poke-at.

Since input is coming across the controller anyways, that also handles networking, etc, leverage that, ride that, and do what you need to on the server-side to reroute that input into the non-player-thing. Replicate it’s updated state back to the player-states, that’s yer input-response gameloop.

2 Likes

Yeah, its gonna work I think. I will try it, thank you!

1 Like