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 multiplayer using the same keyboard

Hello, I am currently working on a 2D sidescroller game where two players can play and control characters on the same keyboard, one player using WASD and the other player using the arrow keys. I read that unreal does not really support having using the same keyboard for two players but I believe there are some workarounds to this? I have tried following some solutions i found but the main problem I face is that one character simply will not move at all. I am still fairly new to game dev and some solutions I found are not clear to me.

Product Version: UE 4.21
more ▼

asked Jan 08 '19 at 01:36 PM in Blueprint Scripting

avatar image


(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

I would duplicate the BP of thr character and change the keys for input. This way it will only respond to the input specified for the 2nd player.

more ▼

answered Jan 08 '19 at 02:14 PM

avatar image

21 1 1

avatar image Evigmae Jan 08 '19 at 02:40 PM

only player 0 will get the input, player 1 can't get input from the keyboard.

(comments are locked)
10|2000 characters needed characters left

You need to create 2 sets of input. You only need 1 character bp.

You also need to route all the input from player 0 to player 1, as player 1 can't get input from the keyboard.

alt text

What I'm showing you id done in my BP_Character. Of which there are 2, one possessed by Controller 0, the other by Controller 1.

Yet, when player 0 gets the input from the set it's not supposed to use, it routes it to player 0.

Player 1 will not get any input from keyboard, so no need to check anything really.

0.png (114.3 kB)
more ▼

answered Jan 08 '19 at 02:39 PM

avatar image

1.6k 7 3 8

(comments are locked)
10|2000 characters needed characters left
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