In this case button should really on consist of an ‘interact’ button that is triggered when your cursor is on the button.
**On a side note–on the LineTraceByChannel you can see the line traced visually by changing setting on the Draw Debug Type setting on the node, helps for configuration.
So here I cast it to my ButtonTest and then I used a Gate node so that whenever your cursor is over your button, it allows you to use your interaction key (in my this case its just the number 1). If the cast failed (cursor is not on ButtonTest) the Gate closes which means you wont be able to use the interaction key. This interaction key will call the function InteractObject. The function InteractObject is a custom function that you will have to place in each object you want to be able to have interaction. I just wanted to show the flow here but you can ignore the sequence>doonce>printstring nodes here; you can connect the exec in straight from the button test to the open gate node.
Here I’m trying to show that I have a single ButtonTest bp and a single ExplodingBox bp in which I placed two instances of each in the level. Using a branch nodes you can link each instance of your button to any instance of an object in the level.
So this is the general setup in the blueprints of the objects you want interaction with. the custom function that we used in the level blueprint ‘InteractObject’ is defined here, and all it does is allow player input. Then you setup whatever object it is you want to use.
In your elevator example, what I would do is right next to the InteractObject node I might put a PrintString node that says, what floor do you want to go to etc and then enable input so the player can choose a floor or something. Then store the input as a variable in which the ElevatorBP can utilize.
Also, if you want, instead of creating an InteractObject node you can make three custom events for Up Down and Stop and just call those events in the level blueprint. It’s not really a difficult topic it’s just very specific to what you are looking for. Hope this helps!