I’m trying to make a simple light switch (button) with existing UI on the scene. I’ve already created the button and I need help with how to connect it to all the lights so I can change their intensity, and keep them on even if directional light is high in the sky.
Toggle visibility is for objects to be visible or not. Find the right parameter like light intensity. Not sure what exactly it is. Drag it off the light component and it will show in the list.
Still having issues with the lights, again the button is working:
Problem comes in this part, I made selection for all the lights and made a BP, but cant control their brightness:
Help much needed, and appreciated.
The widget is sending a message to an actor:
How is this reference Set? Assuming this is it:
Can you describe how you think it works? Maybe I’m missing something. There’s something dodgy here, if you have the correct type, there’s no need to cast (the blue note).
Also, why get Component by Class if you can just wire in a desired component instead?
Any reason why what I posted originally does not work for you?
Primarily the issue is that I am a total noob at this, so starting from -0. I rally have a superficial understanding of everything.
So what I’m trying to do is change light brightness through a on screen widget, but I can’t figure out how to call all the lights I have for that building. I made a Blueprint for them, but when I click on the button nothing changes.
- is there more than 1 building?
- how are the lights made to be a part of the building, are they attached somehow, assigned?
- if there’s more than 1 building, how do we select buildings?
There are 2 buildings, I’m scavenging parts from one to the other.
Lights are just simple point lights and a lot of them(200+).
Sacrificial building will be removed after everything is collected
There are too many unknowns to suggest a good solution, I’d need to understand how your game is supposed to work. For example, from what you said above, I still don’t know if we’re interacting with all lights at once or with one light at a time.
Assuming it’s all lights at once; for something generic / agnostic (and pretty crude), you could try this:
- search for and select all point lights you want to interact with
- give them all an actor tag
- in the widget:
Thanks, a lot, that really was what I needed. Finally working.
Hello there, I wish you can reply after all this time, this blueprint you shared is amazing, it worked with me in the level blueprint perfectly, yet I have different lights with different buttons, how can I implement this with different buttons
The previous post had no details so this solution is not that great, tbh.
The buttons and the lights are already in the level? Would you consider combining it? An actor that has a widget and a light component? Could that work?
Other than that, you may need to share more info regarding how it’s supposed to work.