Trying to get a light to change visibility on collision with a seperate blueprint but it does nothing.

Pretty much the title says everything other than;

The picture below is the blueprints im using and a picture of the light/collision

  1. LightController - Collision.

  2. Light in a StaticMesh BP (Not visible)

  3. LightController’s BP Event Graph.

Did you fill the “LightController” variable?

Yeah, I set it to the LightController BP

That sounds like the type rather than the actual object.

Did you use the “Set LightController” variable somewhere or referenced that exact object somehow to this variable?

For example you could make that variable editable. Then you can select any object of the type LightController BP inside of your level and have it referencing properly.

Erasio is on the right track with their suggestion! To further elaborate:

Event Graph for LightController

Set Target Light as an object variable of the blueprint that houses the light you want to toggle and make sure it’s marked as editable. Get a reference to it as seen above and you should be able to drag a wire off and get a reference to the point light in the target blueprint (in my case I named the point light Light Source). Drag off that reference to the light and should have access to the Toggle Visibility function.

Marking the Target Light variable as editable allows you to specify which light in your level a given LightController should toggle. You can set it in the LightController properties as seen below.

Properties for LightController

I hope that helps! Let me know if you have any questions. ^^

Wow haha thank you all for your help, Erasio and Nick was right.

For anyone with the same problem my issue was not the blueprints, it was the “Editable” box, once I had placed the Trigger into the world I had to set it in the detail panel, which light to control, this fixed the problem.

Although I would like to ask how I’d make it so I can edit the visibility of more than one light at the same time.