Clients do not react to input
For our multiplayer game (listen server), I created the initial spawning for the players similar to the here shown respawn mechanism. However, as soon as all actors (one for each player) are spawned, the clients do not react to any input, while the player, who is hosting, works just fine.
I thought that the possess node was the issue, but the player controllers switch their view to the cammeras of their respective actor and the HUD of each player seems to work, too. If the hosting player ( = the server) pushes one of the client´s actors into a trigger box, their HUD reacts correctly. I also found this question in the AnswerHub, but to add a "focus to the Game Viewport"-node did not change anything. The game mode gets set to game only, as well. I also tried to switch this node to other BPs (e.g. PlayerController), but still no reaction to input for the clients...
This is the Spawn Event on the server (GameMode) :
And here is, how it is called (from within the GameMode) to spawn all players:
The InputMode gets set as soon as the game gets started:
Has anyone an idea, what I could have overlooked?
asked Feb 26 '16 at 12:30 PM in Blueprint Scripting
Finally, I found out what the problem was. As can be seen in the screenshots, within the function StartRace I go through all players and set their input mode to GameOnly. However, this function was located in our GameMode and, contrary to my expectaions, this change of input mode was not replicated to the clients, it only happened on the server (So it never was a problem for the host). To solve it, I created an event in the PlayerController where I changed the InputMode for itself and called this event instead of SetInputModeToGameOnly. This event is set to ReplicateToOwningClient (and Reliable).
Hope this helps, if someone else makes the same mistake... :)
answered Apr 26 '16 at 02:19 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here