Skill Buton With UMG

Hello guys i got a quick questions, can’t find the answer on the web sorry if i don’t post at the right place !

I was wondering how can i make a skill communicate with a umg button ?
I mean i have a skill like dash the character forward and i use it with i don’t like like P on keyboard
Now i create a widget with a button, now i want to use my dash skill with my keyboard input ’ & ’ , concretly with the button

Well i don’t know how to explain it, Simply How do you use a button with you keyboard instead of the mouse ?
Like in any mmo or rpg skill ?

Thanks

On your created widget, when the button presses, you access the player’s character (or controller, depending how you have everything set-up) and engage a custom event or function. That custom event or function is going to check wether the skill can be cast as well as cast it if possible.

When the skill is being cast, you should also update the widget by passing the cooldown time for the skill. Pass it only once so you don’t have to update the widget every time. Then, just on the widget’s tick event, reduce that cooldown time based on delta seconds provided. If the countdown is <=0 , then light up or make the button visible again (no need to call the player character again because it’s already in sync!)

Oh yeah i see, i’ll try it thanks a lot :slight_smile:

Hum… i got it in my mind but i can’t really finish this…
About the cooldown the event etc i get it but when it’s come to comunicate the button with my skill i don’t understand…

I just want to use my skill with keyboard and the only way to use it is with my mouse because i can’t link them :confused:
My button in my widget work perfectly with the custom event and everything else but i can only use it with the mouse and not the keyboard. Any idea ? look likes i need to use keyboard focus or game mode only and ui well i don’t really know but i can’t link a button with my keyboard
I really need the button to be ’ pressed’ when i use the skill, i mean the visual effect like a lot of game lol if not, it’s not a skill but just a keyboard binding without any graphic representation

Well i’ll wait for answer if anyone could help me, and understand me…

THanks all