How to search/get component of an actor from a Blueprint Component Class that it is attached to

Heya

I trying to implement a blinking light feature. I have complete the logic and it is working.

Now, I am trying to create a blueprint component (not sure if scene or actor blueprint is correct/better) that allows me to use it for any light type by attaching it to a light currently placed in my level. Let’s call this new component BP_Component_BlinkingLight.

I am trying to get a reference to the light component of the actor that the BP_Component_BlinkingLight component is attached to. However, I am not sure how. I have tried GetParentComponent and GetChildrenComponent but both do not work.

The below screenshot is how I got a reference to the light component in my old ordinary Actor Blueprint with a Light component manually added inside. How do I modify the following it so that I can store a reference to the light component?

Any responses greatly appreciated! Thank you in advance!!!

Hi.

The node you want in the blueprint is actually “GetOwner” to get the owning actor of that component.

I have made a video for you on my YouTube channel :smile:

I hope that helps.

Cheers.

3Dev

Exactly what I was looking for! Thank you so much!