UE4 Using Widgets as an input source?

In the Elevator BP:

  • During BeginPlay you create the widget and save it as variable, then set it’s parameter “ElevatorReference” to self

  • During BeginOverlap you add the widget to viewport

  • During EndOverlap you remove it from parent

  • Use a function with a parameter so you can easily call it from an external BP
    (I don’t know what your “Floor button” float parameter is, maybe you meant bottom?)

In the ElevatorWidget BP:

  • Assign the button onclick event, checking if the elevator reference is valid (right click on the regular get and click “convert to validated get”)

Let me know if it works, if it does pleas mark my answer as solution :blush:

1 Like