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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Passing client-side username to server on join

For our game, the client first opens a map locally, and executes a REST call to our company's servers to log in. It obtains a user id in this manner. It then joins a server by using the console command open ip.ad.dr.ess.

We want our server to be able to see these user ids. Our server can currently pull the player names, but this just ends up being the machine name for PC, or another random number for Gear VR.

How can I keep the user id obtained locally when joining a map on the server? I've tried creating a save game, but this just tries to load a save from the server rather than from the client. Our player state also gets re-created when joining the server, so I'm not able to keep variables in the player state.

Product Version: UE 4.12
more ▼

asked Aug 15 '16 at 05:50 PM in Blueprint Scripting

avatar image

6 2 6

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

1 answer: sort voted first

Best way to do what you trying to os is to create your own OnlineSubsystem for you online service, it a common interface for online social services like Xbox live, PSN, Steamworks etc., there no documentation for it so you would need to learn form looking at source code of existing subsystem


OnlineSubsystemNull is a base implementation and it'c consider a good base for your own implementation

Alternatively you can make replicabale property with proof of login (remember about security!) in PlayerController or PlayerState classes so it will replicate to server and it can recognize user. But i really recommend OnlineSubsystem implementation if you got C++ programmer in disposal.

more ▼

answered Aug 15 '16 at 07:14 PM

avatar image

36.6k 931 169 1111

avatar image narvalouspeter Aug 15 '16 at 10:05 PM

Ok, thanks. No C++ programmer yet but when we get one, this looks like it may be a priority.

We were also thinking of potentially using the OnlineSubsystemOculus for our GearVR app down the line, but we also want to retain our own login. As far as you know, is there a way to use two online subsytems?

avatar image Shadowriver Aug 16 '16 at 05:50 PM

As i remember right yes you can use 2 or more systems, but you need to activate 2nd via C++, blueprint control of onliesubsystems is quite limited

(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