Announcement

Collapse
No announcement yet.

Use clickable buttons on UI to give character a speed boost

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Use clickable buttons on UI to give character a speed boost

    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://www.youtube.com/watch?v=FjtHM3zgqcg
    How to achieve such functionality. Thanks in advance.

    #2
    Hello,

    You can do using `Event Dispatchers`. When an user clicked UI from UMG Widget, broadcast the event.

    See Blueprint Event Dispatcher

    Comment


      #3
      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).

      Comment


        #4
        Originally posted by Khubur View Post
        Hello,

        You can do using `Event Dispatchers`. When an user clicked UI from UMG Widget, broadcast the event.

        See Blueprint Event Dispatcher
        Thanks i will look into it.

        Comment


          #5
          Originally posted by mariomguy View Post
          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).
          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

          Comment


            #6
            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...

            Comment


              #7
              Thanks everyone i was finally able to implement it. Thanks a lot.

              Comment

              Working...
              X