Making a node/wire system to link objects for events?

Part two of my puzzle game post, is it possible to make a kind of wire or node system to link objects for events? I’m thinking something kinda like the Portal 2 chamber editor, where you can link buttons and mechanical stuff to make puzzles.
Sorta like this:
image
My first thought would be to make a third sprite that the activator and the activated both touch but that runs the risk of them overlapping with each other depending on what I’m making

Hi, just a suggestion on how you could get started:

For the visuals you could draw a line between the two elements with the shape painter. By clicking on the elements for drawing the line you could at the same time toggle a boolean object variable that enables a logic connection between them. Which elements can be linked and what happens afterwards is something you need to define based on the rules of your game.

I’ll try that, thanks for your help!