Script for a Widget Button

Is it possible to bind a “shooting” script on a button for an example. There must be a way to use script from character blueprint on a button or do I have to make the button in some different way.

I tried custom events, but the won’t work correctly on buttons, because i can’t fill all the “shooting” script on a custom event.

I’m trying to transfer my game from Windows to android and I’m not going to use joysticks, cause they are terrible to use on android.

Please help!

I would use custom events. Could you please explain why they dont work correctly for you?

I have input axis value connected and i can’t get it to custom event. I created new movement script for the buttons.

Now i have another problem. When i die, movement buttons are disabled, but i can still move if i keep holding the button through death, but if i release, i can’t press the button anymore and not able to move. “disable input” doesn’t work because buttons doesn’t use inputs.

Well, for the death button problem you could just remove that widget from parent and quickly add it to viewport again, it would reset the widget and fix your problem.

Well, i thought it would work, but it didn’t.
Atleast trying in viewport using mouse.

Fixed it by destroying “Character Movement Component”