How to make a widget move an object?

Hey everyone, I have asked a similar question before and I thought I found the answer. Unfortunately, I am still having issues and I’m hoping that asking again can give me a solid answer.

I’ve been trying to get an elevator to work using a panel that displays a widget allowing you to access multiple floors. For example, when I overlap the “button” it displays a widget that allows you to click on different buttons corresponding to each floor. I want each button in the widget to create a timeline (or whatever works best) that allows the elevator to move to the selected floor without having to load a new level each time the button is clicked.

All of the tutorials I’ve seen allow this to work with a single floor panel acting as the elevator, but I have over 320 actors that need to move together. I’ve made the group actor into a blueprint hoping that this would resolve the issue, but I still can’t reference timelines or matinees inside of the widget blueprint. When I try to create the script in the level blueprint I have issues making the reference to the widget panel.

Here are some screenshots:
The Elevator: Screenshot - 956ba503ffa4881bdcb6293df2227910 - Gyazo
The Panel: Screenshot - 06e2d336db5f464889aec9599f909eff - Gyazo
The Widget in game: Screenshot - d3350273f8b56f73ec0f1462c28c653a - Gyazo
Temporary Script (using open level logic instead of actually moving the elevator): Screenshot - 57232f5da9727ee811c5b1c7a7e102d5 - Gyazo

I really want to make the game seamless instead of using multiple levels so I can allow free movement through the entire game. I plan to use ladders and ventilation ducts to give the player complete freedom in how they want to explore the game. I would love to know how to make the elevator move without using “onclicked” “load level” logic. If theres a way that I need to build the button without using a widget that would work, but I couldn’t think of any other way to do this since there are over 20 levels that need to be traveled to.

the elevator movement logic should be contained within the elevator actor, not within the widget. when the elevator creates the widget, it should pass itself as a reference into the widget. the widget should store that reference and use it to call functions in the elevator blueprint.

the elevator movement function can set CurrentFloorLocation, NextFloorLocation, and bMoveToNextFloor variables. then vinterpto on tick, if bMoveToNextFloor is true. bMoveToNextFloor would be set by a function called by the widget on click.

I think I understand this to some degree, but I’m still a little bit confused. If I make the logic inside of the elevator actor, how do I begin the timeline sequence? Is it just an event begin play? I should state that the elevator and the buttons/widgets are separate objects.

Hey, I’m still having issues with getting the timeline to work by using the widget. I’ve gotten the timeline and lerp to play perfectly upon an overlap of a box trigger placed inside the elevator. But when I’ve tried setting variables in both the widget and the elevator BP the elevator BP won’t move. I set up a variable called “buttonFloorAClicked” and set it to true in the widget BP upon the button being clicked. Then I set a branch to play the timeline when the widget button is clicked. It still won’t work.

"If I make the logic inside of the elevator actor, how do I begin the timeline sequence? "

inside the elevator actor, you can make a custom event called ElevatorMoveToNextFloor. inside the widget you can make a variable of type ElevatorActor reference, and set it to editable and exposed on spawn. then in the elevatorActor, you can spawn the widget, and pass itself as a reference.

then when you click on a button in the widget, you can call the ElevatorMoveToNextFloor function on the ElevatorActor Reference that was set on spawn.

its hard to explain with words. you just need more practice with communicating between blueprints. watch this:

I’m still having issues. I’m going to link a couple of screenshots and maybe you can show me what I’m doing wrong.
This is the elevator actor BP:

This is the Widget BP:

Sorry about the random print string, it was a debug reference. My problem now is that I keep getting an accessed “None” for the custom event reference in the widget BP.

when you create the widget, you have an input called ElevatorCompiled. plug a Self node into that, and your reference should be valid.

also, just in case, you should go into the onclicked event, and right click the GetElevatorCompiled node, and convert it to a validated get, so it avoids the access none error, even if the reference is invalid.

That worked! It seemed that the problem was the validated get inside of the widget. When I plugged both the valid and non valid nodes into the custom event it worked perfectly! Thank you so much for your help. I really appreciate you taking the time to help me.