Affecting an object via another actor.

I’m looking for a way to affect object (X) when I interact with object (Y).
For example, I want to turn off/on a light source in my scene via interacting with another object, the light switch.

I have the interaction event setup to trigger nodes within the actor blueprint but don’t know how to reference an object in my scene which is separate from the actor.

The only way I’ve found to get this working is if my switch and light source are in the same actor blueprint. Ideally I want my switch / event trigger to be separate from what i’m trying to trigger.

You might want to use an event dispatcher OR expose a variable that you can set in the editor that allows you to set the actor you need. If you are using overlap or hit events, then you can extract the other actor from that.

Can you give more details? Then I can give a better answer.

you can find what you need in the content exemple project (level scripting project)…
and as noobs said, you ll need to bind an event .
more info here :

If the green cube is a generic switch that can take any light or actor I would say that you should make a variable inside the switch called ‘Light’ and expose it (click the closed eye to open it). Then, in the editor you can select the switch and in the details windows you can set an actor as the Light. Then, as the switch is activated it calls whatever function you want to call on that exact light.

If you have another switch that should affect another light or you want to change what light is being affected, then simply change the variable in the details panel.

EDIT:
Btw, if you want to take a screenshot of a small part or the entire window or your entire screen, think about using a tool like puush. You dont have to save a copy on your computer and it automagically uploads the image and gives you a URL.

Essentially i have a switch (Green cube) and i want to turn off the pink light. I’ve already got it set up that i can affect anything within the green cube actor, but i want to be able to control other things in my scene via this / similar switches.

Worked brilliantly, thankyou!
ty for the tips aswell.