Inherited variables from parent class keeps reseting in Child BP

The inherited variables from parent class, that were set in the child blueprints randomly resets to default values (the one in the parent BP).

Engine version is 4.12.3

Any variable types seem to be affected, from integer to structs, everything gets reseted.

I don’t know this exactly happens.

It happened both, with class that were in the level, and with ones that only were in the content browser.

Not all child Bp resets at once.

Any help is appreciated, i will start setting all the variables in the construct scrypt now.

Sorry for the bad english.

Hi D2liriuM,

I did some digging and we have had reports from other users fixing this by restructuring content (being mindful of cyclical dependencies). Here is some advise by one of our developers on how to do this:

The general suggestions we make to
clean up dependencies are usually to
use interfaces and event-dispatchers.
Using dispatchers usually makes your
dependencies one way, and interfaces
let you obfuscate dependencies on a
Blueprint that may bring in a handful
of unrelated dependencies.

If you still can’t fix the issue, we will need some more info. What exactly are you doing when the variables reset? Do you have a small test project or a stripped down version of the project that has the issue?

The problem happens like this:

I have a blueprint called spell (Actor Bp). In this blueprints i have some functions and variables defined. As a child, i have “buffs”. This buff bp has some extra variables and functions . Whenever i want to create a new spell or buff, i make a child of one of these. And i set the variables in this child acording to what is needed and also some events.

This child’s variables,gets reseted back to deafult sometimes, i really don’t know when.

One thing i could do to solve this, is create a big struct and move all variables there. Then i would use datatables to save the variables, but i am not sure if it is a good idea, cuz the struct will contain a lot, like 50 variables or so.

The other thing is using the construct scrypt to set all the variables instead of the variable’s tab in the editor.

What would be best?.

I think setting the variables in the construction script is the way to go. Having structs of that size can sometimes just be asking for trouble down the road.