I have a blackboard key set as type object with a base class of actor which is a reference to an enemy in my game. In a task in the attached behaviour tree, I’m setting this reference which is allocated in runtime to the Get Actor of Class node and trying to use a custom event from that reference like below.
Because this reference is set in runtime, the Get Actor of Class is returning an Actor object reference thus not allowing me to access the Blueprint custom event. Is there any way around this that doesn’t involve hard coding multiple different versions of the same behaviour tree task for different enemy types etc.? Eventually I’ll make this into a base class so every enemy will have this custom event, but even so how would I access it when it’s allocated at run time? Is there any way to do this without hard coding the actor class like in the first picture?

