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....
asked Jan 28 '16 at 08:22 AM in Blueprint Scripting
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:
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.
Hope it helps.
answered Jan 28 '16 at 11:21 AM
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.
answered Jan 28 '16 at 05:48 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here