Need help and ideas for my lightswitch and lamp system!

Hello! So I have tried to make a system that makes level design easier for me when creating a big modern house. I have lightswitches that are going to be placed in the house and each of them has a specific lamp connected to it.
This is what I have so far:

However when I add more than one lightswitch (each time I do this I change lampref variable to a lamp in the scene) the toggle effect only works on the last placed lamp-and-switch-combo and stops working on the previously placed.

I am fairly new to blueprint, so any help is appreciated! If you have examples of a similar system that actually works I like to hear about it!
Thanks :smiley:

What you try to do could work like this but I assume you set somewhere a default input right? You should only enable that if the player is nearby and also this way only allows for a single lamp combo.

I recently did a video about something very similar. You just have to replace the “Get All Actors of Class” I used with your variable and don’t even need a script for your light. Maybe that already helps you far enough.

Cheers :slight_smile:

Thanks! You tutorial was great and helped a lot :smiley: I had to do some work arounds for it to work on my game, but all in all it works now!