However, it always gives output ““Default OnLaunch implementation””, which means it always invokes default event code. In the past, I derived my class from Actor, and the event override was working fine. Now that it’s UObject it does not work. What do I do?
Here is the way how I instantiate my object before calling its event (maybe I do it wrong?) :
void AWolfdalePlayerController::AddSpell(TSubclassOf<class UWolfdaleSpell> Spell){
//ADDS TO ZERO INDEX SPELL FOR NOW
UWolfdaleSpell* cSpell = NewObject<class UWolfdaleSpell>(Spell);
Spells = cSpell;
}
This is a blueprint-called function, which adds a spell of a specific class, listed in the argument, to the array of spells that playercontroller would have.
I make the event in Wolfdale spell, then I make it possible to add new spells into the Controller class, then I create those spells using NewObject() funciton in the Controller. Then in blueprints I use that functionality such that I add new spell to the controller and bind its’ Launch func to G keypress. In the spell blueprint (testspell) I implement the OnLaunch() event, which is being called straight from Launch() func. And it does not work.