Download

Get button in other blueprint

Hi, i have problem with button in UI menu.
Goal: If press key “4” spring arm lengh to 5000
(this work ok), if button click, then set spring arm lengh to 5000.
Problem:
I cannot get button in first person characer blueprint.
I cannot bind button click to key 4.
Please, help me …

Here is a way to do it using an interface :

Create a new Interface Blueprint + ChangeSpringArmLength function

Iterface.PNG

Character BP :

9bcd01041db6104f7f310a16760217f7c8023537.png

Widget BP :

371d08b635894699f47f3cbe48df189a9d64e31b.png

Do you really need to press the button for event occur?
Because general idea is, make some event -> make a button be able to call this event. In your case, event can be called from a button and from a key, both button and key is a trigger for an action, so do you really need to one trigger call another which call an action?