Is there a way to change values that was set in Construction Script?

I am making a tower defense game and i have a bool that define if the tower can attack or not. And i am using a DataAsset to change all tower properties in Construction Script, so it updates once i change the DataAsset.

I also set others tower properties, like tower range, attack speed, damage, etc. But you can upgrade the tower, so these values should also change. But i cannot change any value that has been set in Construction Script, because if i change any blueprint value it updates and reset.

So, is it possible to change these values, something like an override, that gives priority to the values that i set?

I know that i could set these values in BeginPlay, or in other places, but i like the visual feedback that the ConstructionScript gives. Its kind of a dumb question, but i would like to know.

Hi,it’s not a dumb question.don’t shame about getting to know new knowledge :smile: .
you can wrap all the stuff in the construct script into a function.then you can call it everywhere anytime.
you call it the first in construction.2nd time another place to overwrite those variables.

1 Like

It’s true. I even tried to change the bCanAttack in blueprint, but it kept attacking, so i thought it hadn’t changed. Now i see that i just forgot to check bCanAttack before attacking :sweat_smile:. And since there is no way to change it through the details tab, i thought it wouldn’t work in blueprint as well. Thank you so much.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.