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 to define the default values of a Struct/Array in a Struct?

I have made a Struct Blueprint that contains a plethora of variables, some of which are other Structs/Arrays. How can I edit the default values of those Structs/Arrays?

(Some are even arrays of Structs.) alt text

Product Version: Not Selected
Tags:
structinstruct.jpg (17.9 kB)
more ▼

asked Jul 17 '14 at 07:07 PM in Blueprint Scripting

avatar image

Erdrik
418 47 52 73

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

1 answer: sort voted first

Hello,

Unfortunately this was a known issue with some builds. I can confirm that this has been resolved in 4.3. Now, there is a section to the right of the Structure dropdown where you can define all of the Array's values.

alt text

I hope that this helps.

-Alexander

struct_array.jpg (37.3 kB)
more ▼

answered Jul 17 '14 at 08:01 PM

avatar image Erdrik Jul 17 '14 at 11:29 PM

Ah! Thanks. I had not updated to 4.3 yet.

avatar image cdrose Mar 04 '15 at 08:53 PM

Hi, I'm using 4.7.2 and the default values I set as above are not inherited into a blueprint when I create a new variable from the structure, they are all zeroed. Am I doing something wrong?

avatar image Alexander Paschall ♦♦ EPIC Mar 05 '15 at 12:09 AM

Hi cdrose,

I was able to get my struct variable to display the default values I had set. I created a new Struct asset, gave it a float, set that float to 300, saved, created an actor blueprint and then added the variable. It returned that the float was set to 300.

Can you show me exactly how you have set up your struct and also where it is not displaying the correct values? Any additional information about this may help.

avatar image Smomo Apr 08 '15 at 05:04 AM

Hollow Alex, I am using 4.7.4, and I found another bug about the custom struct variable. alt text

This is my custom struct variable, I created it in content browser and then add a new variable in my player's BP.

The weird thing is that EVERY time when I restart my project, I always get those long number after the variables name ( I think they are memory address).

I can refresh them so they will become normal, BUT they are going to lose their default value! I need to reset them manually every time.

The variables with such bad name still work as they are normal, but they are entirely annoying me.

Edit: The variables are going to reset all to 0 when restart the project. The situation is getting worse.

bad node.png (65.9 kB)
avatar image Ranz Apr 08 '15 at 10:26 AM

I had this bug in 4.7.2, then it was fixed in 4.7.3. Now, I wonder why it had to appear again...

avatar image TJ V ♦♦ STAFF Apr 10 '15 at 05:46 PM

Hi Smallee and Ranz,

This is a known issue that we have been investigating. It is fixed in our latest internal build and we plan to have it included in the 4.8 update.

Cheers,

TJ

(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