Use Widget Button in my player input

0

I have 2 buttons in my widget blueprint for 1 input action. (Smooth Movement and Teleport) I need when the player clicked on the one of them my input do that. can anyone help me??

Hey there @mhr1384! Welcome to the community! So widgets can’t call input actions traditionally (in blueprints). What you’d do instead is make your input and the widget both call the same event instead. So say if you want your teleport to fire when you hit your “Jump” input action as well as the button in the widget, you would first set up an event you can call to activate it then link it up with your input action first.

Then on the widget, you’d do something like this to call initiate teleport on your player:

This is a really basic way to pull this off though, so you can do much better by having there be a player variable so you don’t have to cast constantly, but this gets the point across. These docs will help you understand BP communication better to make this setup a bit cleaner: