This is the code of the function i’m using.
PS: Starter spells contains a blueprint class.
It’s being spawned , but it’s not being added to the ActiveSpells
The spells that are in the action bar.
To explain a little bit further, i’ve done the spells and spell cast, aswell as widgets with blueprints(action bar and such). But i realised doing the way i was doing would give me problems in the future, so i started defining what i realised would cause problems in the future in c++.
Currently, the c++ is not doing anything, but fixing it after finishind this Add part would be a matter of changing a few nodes.
I found the issue. I was checking if it was valid through BP, but since i was starting to define things in c++ that were from BP, i actually was checking the value of the bp variable and not the c++ var, that had a very similar name.
But i changed the code to use ->GetClass() before i realised that, and it woudln’t work, the way i was doing was the right one.