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 find the amount of players connected to server as the host?

How can you find out how many players are connected to a host , or find out when a new player connects?

Product Version: UE 4.10
Tags:
more ▼

asked Nov 18 '15 at 10:22 PM in Blueprint Scripting

avatar image

laserbeam897
3 6 6 9

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

1 answer: sort voted first

In server or outside of it? Everything you need is in GameMode:

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Ghttps://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/AGameMode/GetNumPlayers/index.htmlameFramework/AGameMode/index.html

Get number of players:

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/AGameMode/GetNumPlayers/index.html

There also varables NumPlayers, NumSpectators, NumBots and NumTravellingPlayers all blueprint accessable, you might try to add them up right

PostLogin is ealest in accessable in blueprints event called or player connecting:

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/AGameMode/K2_PostLogin/index.html

Also each player gets it's own PlayerController so BeginPlay in controller event can be used to handle player join too

more ▼

answered Nov 18 '15 at 11:49 PM

avatar image

Shadowriver
36.7k 932 169 1111

(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