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"

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. 

How t set a variable in a widget from a Game mode?

Hi, I want to make a scoreboard widget. For that I need to get all the Player controllers that are in my game, I do this with the Logged in/out events in the game mode blueprint + an array variable. But how I do forward the value of this variable to my Widget?

Is there a better way to get a list of all the controllers?

Thanks.

Product Version: UE 4.11
Tags:
more ▼

asked Jun 02 '16 at 08:42 PM in Blueprint Scripting

avatar image

UDKAP
469 29 42 67

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

2 answers: sort voted first

Gamestate -> PlayerStates -> PlayerControllers

alt text

playerarray.png (93.4 kB)
more ▼

answered Jun 02 '16 at 09:02 PM

avatar image

vanlacke
1.5k 65 132 103

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

You should Store Scores in a Player State they are replicated and exist on all clients. You can easily access them from the GameState like this https://gyazo.com/6da544f9f935a51341aba8e3175ea1aa or directly from the Controller (his own State that gets replicated)

Also take a look at this Handy Compedium made by eXi http://cedric.bnslv.de/Downloads/UE4_Network_Compendium_by_Cedric_eXi_Neukirchen.pdf

Good Luck and Have Fun Coding =)

more ▼

answered Jun 02 '16 at 09:06 PM

avatar image

Nachtmahr
6.9k 143 26 172

(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