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"

BP - Set Input Mode UI Only

Hello all - i got a problem with a pause mode using SetInputMode-UIOnly blueprint node... when i do this i can use the mouse but the keyboard becomes unusable.... while i am fine with using buttons to click on - this presents a big problem when it comes to things like:

Pausing the game & reentering with the Escape Key for example (how most games do this... i'm debugging PIE mode with M key) Ingame actions menus that require keypress - but you dont want movement out of the keys - think Starcraft, or any other iso action game where you build stuff with hotkeys and the same keys maybe bound to axes.

Here's a screenshot of how i'm doing this - i've read up on it quite a bit and have come across many UE4 forum posts about the same topic - but with different answer approaches.... none of which seem to work.

I've tried: Setting keyboard focus - does nothing apparently Binding keypresses in the UMG Widget is frowned upon from other dev's - they say to keep it in action inputs mappings unposses/reposses pawn - this works but in a multiplayer/networking game i'm jacked....

Screenshot: alt text

Product Version: UE 4.10
Tags:
capture.png (312.6 kB)
capture.png (312.6 kB)
more ▼

asked Jan 28 '16 at 08:22 AM in Blueprint Scripting

avatar image

walldiv
117 8 13 23

avatar image 0vr Feb 10 '16 at 08:15 AM

weirdly, I can't get it to respond to any key presses whether I override On Key Down or not. I'm not even setting the input to UI only. The widget is playing an animation and it's set up to remove itself at the end of the animation by calling an event on itself that removes it from parent. But I can't get it to print string let alone call that function to remove it.

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

2 answers: sort voted first

Hi, you need to override the Keydown event within the widget "MyHud" to do that select the On Key Down option in the Override drop down next to Functions as in this capture:

alt text

You will get a new function set your nodes as this example trap the G key to close the widget and return the control to the game with "Set Input Mode Game Only" node.

alt text

Hope it helps.

Regards.

1.jpg (26.6 kB)
2.jpg (109.3 kB)
more ▼

answered Jan 28 '16 at 11:21 AM

avatar image

durabo
176 5 5 10

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

This works and is what i was left to do - however there are alot of dev's that shun on this tactic to pull this off..... but i'll test the heck out of it and see if i have any bugs - which i dont presume I will.

more ▼

answered Jan 28 '16 at 05:48 PM

avatar image

walldiv
117 8 13 23

avatar image durabo Apr 05 '16 at 01:14 PM

Heya, if this worked for you can you mark as answered? Thanks.

(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