Blueprint script: Not working inside other blueprints?

Hi there,

I made a small behavior script which works great when I attach it to actors in the scene. As soon as I attach it to actor components inside of blueprints it doesn’t work anymore.

GET OWNER doesn’t work when I try to cast the parent to a static mesh actor:

I know that there is a deep, fundamental difference between actors and actor components in UE4, but I simply don’t know how to handle this. Do they share some common interface to which I should cast everything or how is this supposed to work? Do I really have to make every twice, once for actors and once for actor components?

Is there any way to make blueprint scripts work with actors and actor components as well? Many thanks! :slight_smile:

Engine version: 4.7.5

Get Owner is component return parent component or if it’s root component it will return owning actor. isSelectable is owned by DodgeViperMesh, so Get Owner it will return StaticMeshComponent or SkeletalMeshComponent depending which one you use

Many thanks. So I basically need everything twice? Once for actors and once for components? Can I cast the owner to a shared interface of both or something? Is there some concept of polyphormism?

The needed methods do exist both for staticMeshActor and primitiveComponent as well so that would be no problem…