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 set variables in blueprint structs

I am following Unreal Engine's "Blueprint Multiplayer" tutorial on YouTube and have ran into a problem I can't figure out. There is a struct that shows the player name, image, etc.. When I try to set the variable when testing it out, I am unsuccessful; however, when I set the default values for it, I can see them fine.alt text

The area circled should display the name, image, avatar image, and ready status of the player. Nothing usually shows up there unless its the struct's default value.

Product Version: UE 4.11
more ▼

asked Jul 20 '16 at 04:12 PM in Blueprint Scripting

avatar image

CDP Productions
26 6 9 13

avatar image Gurb Jul 20 '16 at 08:25 PM

Hello CDP Productions,

I have a few questions to help me understand your problem.

  • Where is the struct being created in game?

  • Where is the information for it being set (Outside of the default values)?

  • Is there only one instance of that struct available at one time?

If there are any photos you can show of where the struct is created as well, that would help.


avatar image CDP Productions Jul 21 '16 at 05:29 PM

alt text

I've set the widget up so when you enter your information, it sets the variables shown in the middle of the page. Is this "Set Member In S_PlayerInfo" where the variables are set, or do I need to add a "Set PlayerInfo" (its variable type is the struct) before "SaveGameCheck"?

s playerinfo.png (421.5 kB)
avatar image Gurb Jul 21 '16 at 10:03 PM

Until I get home later this evening, I won't be able to test this out for myself to get a more accurate response.

However, have you checked to make sure those three variables are being set when the play inputs their values? Can you show a photo of where your setting the values of the widget components? (IE. Set the text to display the value of the text variable). One issue may be that you might have to refresh the display so it shows the new information.

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

0 answers: sort voted first
Be the first one to answer this question
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