Turn on Lights with trigger box AND widget button press

Is there a way to use one button from a widget to control lights in my scene? I currently have it setup to enable when the user overlaps the trigger box. However, I wanted to add a button that will enable the lights when the user is inside the trigger box AND presses a widget button.

Additionally, I wanted to have the button to have the same functionality to be able to control other lights. I mean, I have additional lights with trigger boxes and want to reuse the same button widget to control their behaviour.

Here’s my current approach for one of the trigger boxes:

Here’s the location button:

I’m not sure if this is the right approach since it doesn’t work. :frowning: I’m wondering if I am overthinking it and there’s an easy solution for this.

you can make a dispatcher in your gamemode BP called Switch Light and add a signature in the dispatch a light ID

then you can set each button and light the ID you want for link em…

then in the light you can bind the dispatcher and check if ID matches then toggles state

and in the switch you can call the dispatcher with the light ID.

If too confusing let me know and I can try to illustrate with pics/video.

are your light actors or just lights in the scene?

1 Like

APPROACH 2:

you can add a LIGHT variable in your button BP and turn on the EYE to expose in the editor.
Then you just drop your buttons in the scene and you can pick/select the light for each button there and then you have access to the light in a variable inside the button.

1 Like

Hello, thank you for the reply! I’m trying to do what you said but I am getting lost. Can you please try to illustrate it with pics? Also, my lights are inside a Blueprint. Please see below:

sure! I hope this video Helps! :slight_smile:

1 Like