Hi , i am following a tutorial to create a sidescroller game in ue4 using blueprints.
There is a section in which we are giving our character a speed boost by using key input. I am trying to achieve same functionality but by using clickable items on HUD or UI.
Here is the link for it.https://youtube.com/watch?v=FjtHM3zgqcgHow to achieve such functionality. Thanks in advance.
Hello,
You can do using ***Event Dispatchers. ***When an user clicked UI from UMG Widget, broadcast the event.
See Blueprint Event Dispatcher](Event Dispatchers | Unreal Engine Documentation)
The character movement that controls speed is “Max Walk Speed.” You can find this as a component in the main character blueprint (not the anim BP, the actual character BP).
Thanks i will look into it.
I am newbie so have been trying to access character movement in onclickevent but it didn’t work. Is there any example in which that what you have mentioned has been used ? TIA
You need to get the character movement from the actual player character - it won’t be immediately available in the widget.
If the widget has been created properly with a player controller, you can get the owning player pawn, cast it to a character and access the movement component there. Just make sure you reset walk speed again if you UI get’s removed…
Thanks everyone i was finally able to implement it. Thanks a lot.