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

**URL:** <https://forums.unrealengine.com/t/how-can-i-make-a-button-to-trigger-an-enhancedinput-event-in-my-player-blueprint/1658624>\
**Category:** Programming & Scripting\
**Tags:** UE-5, Mobile, ue, unreal-engine, touch, UE5, touch-event, UI, Blueprint, question, UMG\
**Created:** [February 1, 2024, 5:38pm UTC](https://forums.unrealengine.com/t/how-can-i-make-a-button-to-trigger-an-enhancedinput-event-in-my-player-blueprint/1658624 "2024-02-01T17:38:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quirinus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Quirinus](https://forums.unrealengine.com/u/Quirinus)\
**Post date:** [February 1, 2024, 5:38pm UTC](https://forums.unrealengine.com/t/how-can-i-make-a-button-to-trigger-an-enhancedinput-event-in-my-player-blueprint/1658624/1 "2024-02-01T17:38:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Leomerya12](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/leomerya12/32/926321_2.png) [@Leomerya12](https://forums.unrealengine.com/u/Leomerya12)\
**Post date:** [February 1, 2024, 6:15pm UTC](https://forums.unrealengine.com/t/how-can-i-make-a-button-to-trigger-an-enhancedinput-event-in-my-player-blueprint/1658624/2 "2024-02-01T18:15:47Z")

</div>

Hello,

Bluntly, I don’t understand what you mean.

> [@Quirinus](#):
>
> 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.

Also, screenshots. Always screenshots.

---

<div class="post-metadata">

**Author:** ![Quirinus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Quirinus](https://forums.unrealengine.com/u/Quirinus)\
**Post date:** [February 1, 2024, 6:38pm UTC](https://forums.unrealengine.com/t/how-can-i-make-a-button-to-trigger-an-enhancedinput-event-in-my-player-blueprint/1658624/3 "2024-02-01T18:38:30Z")

</div>

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

 ![cast to player](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/5/8/b58520f465ae624adeb698d7d9f4350a97088058.png)  
Here is the jump input action event in my player blueprint:  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/3/2/6326a000d3cd24034ef3592b5bcd4fddbceb1844.png)  
I want to see how can I link these two, so that when I press the button on my touchscreen, I jump.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 1, 2024, 7:09pm UTC](https://forums.unrealengine.com/t/how-can-i-make-a-button-to-trigger-an-enhancedinput-event-in-my-player-blueprint/1658624/4 "2024-02-01T19:09:53Z")

</div>

> [@Quirinus](#):
>
> I want to see how can I link these two, so that when I press the button on my touchscreen, I jump.

Like this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/9/2/d92c309ce46c523ac85bc71a9a3ea81dc56f7a43.png)

* * *

Not sure what you’re trying to do here:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/6/d/f6d2199db526af98c313abfcfdbaead539956edb.png)

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:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/e/e/bee8c5195b6c2b4dc5db2f2c77ff101bb04ae3e4.png)

---

<div class="post-metadata">

**Author:** ![Quirinus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Quirinus](https://forums.unrealengine.com/u/Quirinus)\
**Post date:** [February 1, 2024, 8:32pm UTC](https://forums.unrealengine.com/t/how-can-i-make-a-button-to-trigger-an-enhancedinput-event-in-my-player-blueprint/1658624/5 "2024-02-01T20:32:23Z")

</div>

Once again you saved me! 😅

Thank you

---

<div class="post-metadata">

**Author:** ![CursedFayt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CursedFayt](https://forums.unrealengine.com/u/CursedFayt)\
**Post date:** [February 22, 2024, 6:59pm UTC](https://forums.unrealengine.com/t/how-can-i-make-a-button-to-trigger-an-enhancedinput-event-in-my-player-blueprint/1658624/6 "2024-02-22T18:59:40Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 22, 2024, 10:02pm UTC](https://forums.unrealengine.com/t/how-can-i-make-a-button-to-trigger-an-enhancedinput-event-in-my-player-blueprint/1658624/7 "2024-02-22T22:02:41Z")

</div>

> [@CursedFayt](#):
>
> If there is a way to have the button treated like the input itself, it would make things a lot easier.

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

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/5/4/b541ece5e8c910d310959ac7322401dca9223eab.png)

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

---

<div class="post-metadata">

**Author:** ![CursedFayt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CursedFayt](https://forums.unrealengine.com/u/CursedFayt)\
**Post date:** [February 22, 2024, 11:19pm UTC](https://forums.unrealengine.com/t/how-can-i-make-a-button-to-trigger-an-enhancedinput-event-in-my-player-blueprint/1658624/8 "2024-02-22T23:19:33Z")

</div>

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