How can I make a button to trigger an EnhancedInput event in my player blueprint?

Hello everyone,

I am making an android game with two simple buttons: slide and jump. I handle these inputs with enhanced input events in my player blueprint, but when I try to cast that to my widget blueprint, it doesn’t show up and I’m not sure how to make an effective touch interface.

I would be very thankful if you could help me.

Feel free to give me your guidance on how to make a UI for mobile, since I am a bit lost.

Hello,

Bluntly, I don’t understand what you mean.

Also, screenshots. Always screenshots.

1 Like

Okay thank you for your response.
So here is my jump button pressed event in my widget blueprint:


Here is the jump input action event in my player blueprint:

I want to see how can I link these two, so that when I press the button on my touchscreen, I jump.

Like this:


Not sure what you’re trying to do here:

image

If Jump_B is a button and Milo is a character, you’re telling the editor to treat the button as if was a character. That will not work. If you want to access a possessed character:

1 Like

Once again you saved me! :sweat_smile:

Thank you

Hi. I had same question as OP,

With this set up it will just call the jump function right? It won’t actually treat it as enhanced input?

The reason I ask is because I am trying to have my button do repeated actions when held down as the triggered pin from enhanced input would for example.

In my case, my attack widget button calls the same function as enhanced input bound to left click would, similar to the setup you showed I believe, but it doesn’t repeat.

Is this something that would just need a bunch of custom logic? If there is a way to have the button treated like the input itself, it would make things a lot easier.

Any advice is much appreciated, thank you!

Not really, that’d unnecessarily muddle the water. Instead, run a looping a timer and have it execute Jump every x seconds. As in:

Execute Jump 2x per second for as long as a widget button is held.

1 Like

Thank you! I really appreciate the response and I will use this method! :grin:

1 Like