x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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) : spawnvehicle

And here is, how it is called (from within the GameMode) to spawn all players: spawnplayersforrace

The InputMode gets set as soon as the game gets started: ShowHudAndSetInputModeToGameOnly

Has anyone an idea, what I could have overlooked?

Product Version: UE 4.10
Tags:
more ▼

asked Feb 26 '16 at 12:30 PM in Blueprint Scripting

avatar image

Syrill
217 22 23 31

avatar image cageman Feb 28 '16 at 09:33 AM
avatar image Syrill Feb 28 '16 at 11:30 AM

Thank you for your help! :)

The replicates flag is checked in the default blueprint of the pawn.

Furthermore, I checked, whether the spawned actors (In the spawn event on the server) might be not valid and thus not possessed. However, they all seem to be valid.

avatar image Syrill Apr 25 '16 at 01:22 PM

New project (this time with UE4.11), same issue again... :D

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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... :)

more ▼

answered Apr 26 '16 at 02:19 PM

avatar image

Syrill
217 22 23 31

avatar image Sargas Evigmae Aug 14 '17 at 05:58 PM

I just want to thank you for this post. I got really frustrated because my client wasn't working. Turn out I was also setting input mode on the game mode!

avatar image Syrill Aug 14 '17 at 06:36 PM

Glad I could help! :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question