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.
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:
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.
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.
answered Mar 03 '15 at 12:45 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here