How to access blueprint default variable?

Hello,

I’m making a spell system. I created a base spell class with all the needed variable and functions. When I want to create a new spell, I create a bluerint based on the base spell class and set the default value and create the graph.

Then I put in my character an array of type : TSubclassOf, array that I fill in the editor.

When I need to use a spell, I spawn an spell entity based on the blueprint class. But I would like to draw a text in the HUD that describe the spell, it cost, effects, etc…

Is there a way to access to the blueprint variable without spawning it?

Thanks a lot,

Quite a few ways you can handle this. You could store all these base values on your base character class, since he is the one that will learn the abilities.

Or, you can spawn a blueprint into the world that holds all the base values of all your variables. Then you just call on that blueprint to retrieve the values.

Perhaps eventually you are going to want to use some kind of data table to store all your variables and their values as they grow stronger.