Hi guys,
I been stuck on this issue for a couple of weeks now and I just simply cant get it to work the way I need it to. Basically a player picks the spells he/she wants to use, they get added to an array of Tsubclassof and I spawn the actors from said array (Spell Bar). I’m adding the spells using UMG/Blueprint but no matter what I do, the spellbar array is always empty. Mind you I can get the spells to cast under certain circumstances.
*I know add to spell is not connected, it is just for demonstration purposes, I have tested it with BeginPlay, etc.
*I tried added defaultobjects but that also didn’t work.
Here is the C++
In this situation, the spell does no cast. The only way to make it work is to Cast to FB class → Set FBSpell. But I dont want to go this route as there will be 100s of spells, and the player will pick any at random.
In this scenario I can cast the spell by using the dropdown menu to find the FB class (Cant use a variable), but unless I use set spellbar, the add to spellbar method still produces an empty array. (I want to add conditions on add,thats why cant use a regular set spellbar).
Thank you,