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"

Multiple Player Controllers and Input

Having an issue where I spawn 4 players in my game mode, but input (with multiple controllers) only works on one of the characters unless I click on the other characters in the World Outliner during runtime. After that controller input works.

Does anyone know what is happening?

Product Version: UE 4.10
Tags:
more ▼

asked Jan 28 '16 at 08:15 AM in C++ Programming

avatar image

Stackray
31 9 8 10

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

2 answers: sort voted first

For anyone who is also having trouble with this, on spawning each player I had to make sure I set the player to be AutoPossessed; this is how I did it inside my game mode after spawning a character.

 myCharacter->AutoPossessPlayer = EAutoReceiveInput::Player0; // (Change to 0,1,2,3 for whichever player you need to assign a controller)
more ▼

answered Feb 02 '16 at 02:59 AM

avatar image

Stackray
31 9 8 10

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

Multiple controllers is only supported in splitscreen AFAIK. If you have 4 instances running all characters will have a player controller of 0 which represents mouse and keyboard or th efirst gamepad that's plugged in. The easiest way to enable multiple controllers is to enable splitscreen, and upon spawning each player assign a player controller ranging from 0(player 1) to 3(player 4).

more ▼

answered Jan 28 '16 at 02:44 PM

avatar image

Mootjuh
381 16 17 22

avatar image Stackray Jan 28 '16 at 11:01 PM

Thanks. I've tried with and without splitscreen enabled.

All controllers work in game after I click on the players in the world outliner, but not beforehand. I have also spawned the players in my gamemode proper controller ID's assigned.

(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