1 called spell, with lot of floats such as damage, cost, range…etc
another one. called my character, who needs to have a spell and depending on the spell it will have some different properties.
so what I’m doing is creating a “Spell_C” variable inside the mycharacter. and then I try to set the damage
what happen is that I get the error that says "Accessed none ‘spellQ’ from node Set Damage in blueprint MyCharacter.
I already read about it, and I know is because I don’t have my variable initialized. that’s pretty obvious, but I just don’t know how to initialize my variable so I can use it.
Same way as any other variable, you set it. If this Spell Q thing is a pointer to an instance you need to spawn the instance first, then assign it to your variable.
Is your SpellQ_C a c++ class? and is it exposed to blueprints?
I think its best to do everything in either c++ or blueprints, and try to avoid making a class that needs both, that said there are definitly times when you need to expose a c++ function for access in BP, but for character stuff like what your doing, your probably better off creating the SpellQ class in BP instead.
Both. SpellQ and MyCharacter are Blueprints. I didn’t touch any code yet tho I started using C++ 3 person code template.
SpellQ_C is the type I created the variable in MyCharacter, because is the only one that allows me to access to the functions and variables my Spell Blueprint has.