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 can I get the player's name?

Is there a way that I can get the name that is shown in the leaderboards of the shooterexample? I am trying to create a lobby system, and I want to show the player's names and information on the side, but I can't get the player's name.

Product Version: UE 4.8
more ▼

asked May 13 '16 at 10:57 PM in Blueprint Scripting

avatar image

25 3 9 11

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

1 answer: sort voted first

If you are using the Steam subsystem you should find the username string in the player state,

just cast to the newly joined player controller->GetPlayerState->Get Player name

here's an example i've done in the gamemode

alt text

cattura.png (96.0 kB)
more ▼

answered May 14 '16 at 04:03 PM

avatar image

200 9 10 20

avatar image Prestonator May 14 '16 at 04:47 PM

That worked very well! Thanks!! However, I have one more question, I cant seem to find that OnPostLogin event, is that a custom event? If so, where did it come from?

avatar image iSpakkio May 14 '16 at 05:11 PM

You can find it in the gamemode(create a new one and by writing "Event OnPostLogin" it will appear,don't forget to set it in the world settings too!),it executes everytime a player joins the session

avatar image Prestonator May 14 '16 at 08:43 PM

I still cant seem to find that event, do I need to create a new game mode? I have one that i'm already using. And it is set in the world settings to be the game mode that it uses. What version of unreal engine are you using?

avatar image iSpakkio May 15 '16 at 07:47 AM

I'm using 4.11 but it should be on 4.8 too . Open the gamemode blueprint file,double click on the left "Event Graph" and try writing the event again.

(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