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"

Local Splitscreen Multiplayer Input Mode Issues

We are currently adding a local multiplayer mode to our online multiplayer game. While the replication works fine, we experience some strange behaviour concerning the input modes:

Whenever we change the Input Mode of one of the local players (in its player controller blueprint), the Input Mode is changed for the other local players as well. Examples:

  1. When a new local player drops in and its input mode is initially set to "UI Only", the other players on this PC loose their input for the game. (Means, their input mode is changed as well)

  2. When there are multiple local players and one finishes the current round, his input is so far set to "UI Only" in order to allow him to look at the scores and so on. But at this moment, the other (local!) players again also get changed to "UI only" and can´t play anymore...

However, from the documentation of the respective nodes (Set input mode to Game Only, UI Only, Game and UI), I had thought, the input mode is to be set separately for each player controller. Or am I mistaken here?

There should be a suitable workaround by using only the "Set Input Mode to Game and UI" and setting Widgets in focus or none widget, but I still would be curious if there is not another solution...

Product Version: UE 4.12
Tags:
more ▼

asked Jun 20 '16 at 01:52 PM in Blueprint Scripting

avatar image

Syrill
217 22 23 31

avatar image Kidakaka Feb 07 '19 at 06:54 PM

Did you solve this? Im having the same problem

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

2 answers: sort voted first

What do you usually input in the target slot in your BPs?

more ▼

answered Jun 20 '16 at 06:07 PM

avatar image

Mootjuh
381 16 17 22

avatar image Syrill Jun 20 '16 at 06:17 PM

A self node, since I am already in the player controller.

avatar image mightyenigma Feb 07 '19 at 08:40 PM

We need to see the blueprint to pinpoint the problem. I am doing splitscreen and can have some players moving their pawns around while others are in the menus.

I don't know if that's because I have a more complicated menu logic that uses "Game and UI" mode and masks out certain actions depending on certain flags being set, or if it's because I connected the specific player controller to the Set Input Mode node.

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

Rather old questions, but let me answer this for you all:

InputMode is NOT separately set per player. InputMode is set per Viewport. So in this case the GameViewport. So if you have 2 or more local players and you have one of them opening a menu, you CAN'T set the InputMode to "UIOnly", because that effects the other players, that need Game Input, too.

In this case you need to use "GameAndUI" as InputMode.

more ▼

answered Feb 22 '19 at 02:09 PM

avatar image

eXi
6.8k 333 185 470

avatar image mightyenigma Feb 22 '19 at 06:34 PM

I did not know that. I was wondering why through trial and error that I had to use GameAndUI mode all the time on my splitscreen project when I wanted players to be able to summon menus individually. That requirement causes me to have to add branches and gates to my BP code to tell the PlayerController to keep inputs that are meant for the menus from being processed by the Pawn and moving it around.

It would make things much simpler if the whole viewport was either paused and in-menu for all local players or not, but I designed my game differently from that so I have to deal with the complications that causes.

avatar image Kidakaka Feb 22 '19 at 07:12 PM

And in case you run 2 windows on the same machine (i.e. - play in editor with 2+ players)? after changing the input mode in begin play, the main window is in focus but the second window receives the input

avatar image eXi Feb 22 '19 at 07:15 PM

That is not Splitscreen. Also two screens on one Window is a test case. You wouldn't have that in an actual shipped version.

avatar image Kidakaka Feb 22 '19 at 07:31 PM

i know. but doesnt that indicates that setting the input mode steals the focus?

avatar image mightyenigma Feb 22 '19 at 07:47 PM

I have found when running 2+ instances on the same machine, that all instances receive gamepad input (so it appears that gamepads don't focus instances).

In fact, I Was running a web browser which takes gamepad input (Flappy Bird) while running my project as a desktop app (totally different game) and pressing fire made my tank shoot a bullet in my project, and made the bird flap in the web browser.

(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