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"

Best way to handle local multiplayer with Blueprints

Hello, I am new to Unreal Engine coming from Unity, and am having some difficulty understanding and implementing the whole Player Controller / Pawn setup.

Say I want to have 4 local players on my PC, each with an xbox controller, controlling 1 character each (shared top down camera).

My understanding is that I would need to do the following:

  • create a Pawn blueprint which has the model etc as components, and behaviours (e.g. move forward, shoot etc)

  • create a PlayerController blueprint which handles input

  • drag 4 Pawns into the scene

  • drag 4 PlayerControllers into the scene

  • set each PlayerController instance to take input from a different player index

  • get each PlayerController to possess a pawn

Alternatively I could make the PlayerControllers spawn and possess pawns when the game begins, I am unaware of the pros/cons of either approach though.

If this is correct, can someone please provide a blueprint example of how to route the input received in the player controller to the behaviours defined in a possessed pawn (or at least point me in the right direction)? Otherwise I would love to hear what I'm doing wrong and hear an alternative solution.

Cheers :)

Product Version: Not Selected
more ▼

asked Mar 25 '14 at 10:31 PM in Blueprint Scripting

avatar image

278 16 23 30

avatar image Kagamusha Sep 04 '14 at 11:26 AM

I'd like some information on this as well, as I'm trying to create a small local multiplayer. I'm having trouble attaching HUD's properly and attaching the appropriate pawns on spawn.

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

1 answer: sort voted first

To anyone else struggling to get started with this kind of thing, basically you need to understand that

PlayerController represents one of your players Pawn is an entity controlled by a player.

PlayerController should handle input via the input axis and pass it to the controlled pawn, who will decide what to do with it, so for example the player inputs 'shoot', so PlayerController listens to that event and calls the 'fire gun' function on the controlled pawn you have made.

Lastly to add more local players into your game all you need to do is use the console command DebugCreatePlayer -1

To add a player manually just use the Create Player node in BP.

more ▼

answered Apr 08 '15 at 09:59 AM

avatar image

278 16 23 30

(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