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"

Problem with default values of variables being reseted

I noticed a problem with the default values of variables in some of my blueprints.

I have a blueprint that inherits from Character called BP_GameChar. It has a lot of variables with default values. I have another blueprint called BP_PlayerChar that inherits from BP_GameChar. The value of the variables defined in BP_GameChar are reseted in BP_PlayerChar everytime I restart the Editor.

This picture shows how the values are 0 instead of the default values.

alt text

I show it on a video (mute it because I don't speed and cough a few times)


There is another problem with the default values of another blueprint that inherits from AIController. I has two Name variables with default values set. But when I run the game they seem to don't have any value. I had to set them in the Constructor script for them to work:

alt text This function didn't set the blackboard value correctly because the Name variable was None. After setting the values in the Constructor script it worked ok.

alt text

Product Version: Not Selected
playerchar.png (58.9 kB)
constructor.png (51.5 kB)
more ▼

asked Feb 26 '15 at 09:22 PM in Blueprint Scripting

avatar image

707 33 107 127

avatar image Hany Feb 28 '15 at 07:11 PM

I was going to post the same question, I'm having the exact same problem with default values on child character blueprint being reset on editor restart.

avatar image Slavq Mar 02 '15 at 09:04 PM
  • Same problem here.

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

1 answer: sort voted first

It's the same issue and seems to be a circular dependency problem: https://answers.unrealengine.com/questions/178460/47-defaults-are-zeroed-out-upon-bp-construction.html#answer-180475

A temporary workaround is to set the variables to zero or -1 on the parent and override them on the child bp.

In the thread linked above I've provided the steps needed to replicate this bug.

more ▼

answered Mar 03 '15 at 12:45 AM

avatar image

271 12 113 34

avatar image Slavq Mar 03 '15 at 10:37 AM

I was hoping that these circular dependency bugs was fixed, as it was stated in release notes... This bug is quite similar to this one: https://answers.unrealengine.com/questions/158355/no-animation-caused-by-a-simple-setup-demo-project.html - it was also resetting some default values in similar circumstances...

... Whoops, looks like i've made circular dependency between these threads :D Will whole Answerhub crash now?

avatar image anteevy Mar 03 '15 at 12:58 PM

Thanks, setting the parent variables to 0 worked for me.

avatar image Slavq Mar 03 '15 at 08:44 PM

Fresh news: In THIS TOPIC in accepted answer, user Dan.OConnor says that this bug has been fixed and will be included in 4.7.3, but the link is giving me 404. Have you heard about thix fix too? If so, when can we expect 4.7.3 to appear? And why not 4.7.2?

avatar image Ben Halliday STAFF Mar 04 '15 at 01:44 AM

Hey Slavq,

That link goes to an Unreal Engine GitHub page, so you need to be signed into GitHub to see it. 4.7.2 is coming up too soon for the fix to be implemented. There's no official date for a 4.7.3 update, but if they go ahead with it, you probably won't have long to wait.

avatar image axess21 Mar 27 '15 at 09:01 AM

I still have a similar bug in 4.7.3. I use structure blueprint to store integer arrays, then in child actor construction script i set parent array as one of structure file arrays right before parent construction script. It works fine in PIE, but in standalone preview array length = -1. And I also have circular dependency problem. I tryed to solve it to make everything linear but one of blueprints still decompiles when I compile mentioned parent blueprint.

(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