Hello everyone,
As the title says, what I am trying is basically a game with five players, over a network possibly. There is only one character, each player has a third person camare for that character and is able to control a certain part of the body.
I am new to Unreal Engine 4, and I have no idea how to have multiplayer without their corresponding characters spawned, and everyone sending information to this one Pawn (possibly?).
(Also I apologise if I am posting in the wrong section and ask a mod to move it?)
(Not an expert but…)
It is neither an easy way to do this, nor a trivial one. How I’d do is this:
I’d make a separate Actor (not Pawn) for the body. The body should be moved thorough its custom events. (StartLeftLegMovement, etc.), and this actor should be put in the level.
The PlayerControllers have all the controls for the players, and they call the functions of the Body. (Get All Actors of BodyBP). The PC should store an ID to know which part is his and make a switch on it for every button or so. (So it would know which event should be called on the body.)
The player’s Pawn should be an EmptyPawn that has it’s camera always pointing at the Body and nothing else. (I’d give different cameras for the players so they could look where they want.)
Did it help?
And also some tips about the PlayerController: It should represent the player’s will. Noone else can saw what is in the PlayerController, only the owning client, so every PlayerController can have only one player. But in very special cases it’s possible that one player owns multiple PlayerControllers. When you are writing it you should think about it as a brain. If you’d like to make an AIController, this should be the only part that needs to be replaced so the game could work. So everything about input and control should be in the PC and nowhere else, and nothing else but these.