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"

How to get players from matchmaking server onto characters?

So let's say a level only allows for two characters. From the dedicated server, only two players can connect to the level. There are two characters in the level. The map is two straight roads. One character is connected to the left road while the other character is connected to the right road. How do I assign a player to character1 and assign the other player to character 2?

Product Version: UE 4.19
Tags:
more ▼

asked Jul 16 '18 at 10:56 PM in C++ Programming

avatar image

Talamahawk
1

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

2 answers: sort voted first

Check this out: https://docs.unrealengine.com/en-us/Gameplay/Framework/GameMode

In short your AGameMode knows about all connected players and is responsible for managing connecting/connected players setting their initial state and starting the match when enough players are connected. It is ALWAYS created but ONLY on the server. It also has ChoosePlayerStar() in there.

You should also see AGameState which usually handles your most basic rules like how the players re-spawn holds their score and etc. It is ALWAYS created it is modified by the server (I think) and every player has an up-to-date copy of that class.

more ▼

answered Jul 17 '18 at 06:11 AM

avatar image

dZh0
1.3k 6 5 9

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

Player controller ---> Possess pawn

more ▼

answered Jul 17 '18 at 12:20 AM

avatar image

mightyenigma
3.7k 18 23 20

(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