x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

Can you map a UMG button to an input?

Is it possible to map a UMG widget button to a user input? For example: whenever this umg button is pressed, it is the same as pressing the 'G' key or a gamepad button and will activate my standard input action mappings.

Product Version: Not Selected
Tags:
more ▼

asked Oct 23 '14 at 04:13 PM in Blueprint Scripting

avatar image

Roboticals
11 1 2 4

(comments are locked)
10|2000 characters needed characters left

4 answers: sort voted first

Hello Roboticals,

You are correct, I misunderstood your question. Knowing this, I have a question for you. I read one of your later comments. It says that you would like your button to effectively have a "hold" and "release" function. Is that what you are actually aiming for or do you need the button to simulate an actual key press?

If you are looking for a hold and release style button I may have a workaround for you. There is an example here:

https://answers.unrealengine.com/questions/115718/umg-button-press-release.html

I hope this helps.

Cheers

more ▼

answered Oct 27 '14 at 03:38 PM

avatar image

Rudy Q ♦♦ STAFF
47.5k 545 132 522

avatar image Roboticals Oct 28 '14 at 03:51 PM

simulating an actual key press would be ideal, but it is straight forward enough to work around that with a simple hold and release (if it were implemented). Thanks for the crazy workaround to getting it working with the current version of UE4--it's ugly, but it works!

avatar image Rudy Q ♦♦ STAFF Oct 28 '14 at 07:46 PM

I have an update that makes the button a little better. I have added a way to fake the click effect. This may make this more of a viable option. All you need to do is revisit this link:

https://answers.unrealengine.com/questions/115718/umg-button-press-release.html

(comments are locked)
10|2000 characters needed characters left

I may be misunderstanding this, but couldn't you just put your "G input" things into a function and just call this function from UMG and your input?

more ▼

answered Oct 23 '14 at 04:34 PM

avatar image

AnxGotta
1.6k 61 45 237

avatar image Roboticals Oct 23 '14 at 09:17 PM

For that I would need to be able to tell 2 things: when the umg button is pressed, and when it is released. There is an event for it being pressed, but as far as I can tell there is no event for a button being released, and there is no sort of "is currently pressed" state that I can check.

To relate it back to the example: if 'G' moves a character forward, then I could get the UMG button to start moving the character forward, but how would I know when to stop?

avatar image AnxGotta Oct 24 '14 at 12:11 PM

I see your point. Without ReleaseEvents functionality on the UMG buttons implementing an Input Axis through a UMG button would be tricky if not impossible. I was thinking of Input Actions when I made my response above.

(comments are locked)
10|2000 characters needed characters left

Hello Roboticals,

I have answered a similar question here:

https://answers.unrealengine.com/questions/122518/45-umg-how-to-get-onmousebutton-events.html#answer-122656

I hope this helps.

Cheers

more ▼

answered Oct 24 '14 at 04:16 PM

avatar image

Rudy Q ♦♦ STAFF
47.5k 545 132 522

avatar image Roboticals Oct 24 '14 at 07:22 PM

Hi Rudy, That looks like the opposite of what I'm trying to do. Correct me if I'm wrong, but that answer seems to translate a key-down event to a widget event. What I'm trying to do is convert a widget button to a key--specifically both press and release as you could read in my earlier response to anXgotta.

(comments are locked)
10|2000 characters needed characters left

Was there any answer to the question: Convert a Widget button clicked event to a Axis Mapping such that when the button is pressed, the action specified in the Axis binding is invoked?

more ▼

answered Apr 01 '16 at 06:44 PM

avatar image

chary
1 1

avatar image chary Apr 01 '16 at 06:45 PM

Was there any answer to the question: Convert a Widget button clicked event to a Axis Mapping such that when the button is pressed, the action specified in the Axis binding is invoked?

avatar image Rudy Q ♦♦ STAFF Apr 01 '16 at 07:24 PM

Hello chary

There is a node in 4.11 that is called "Listen For Input Action" that sounds like what you are looking for. I have provided an example below. I hope that this information helps.

alt text

Make it a great day

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question