No announcement yet.

Disable a specific event (InputActionFire) whilst the UI/widget is open?

  • Filter
  • Time
  • Show
Clear All
new posts

    Disable a specific event (InputActionFire) whilst the UI/widget is open?

    My menu draws but clicking a checkbox causes the players gun to fire.
    If I use DisableInput I'm unable to close the UI/widget as the open/close key is caps lock.

    I've tried SetCinematicMode and Set Input Mode Only (Game only/ui only/game and ui) but they also disables caps lock.

    I'm currently experimenting with branches/flipflops and do once's but not having much luck.

    Ideas are welcome. Thank you.
    And so is the Golden City blackened
    With each step you take in my Hall.
    Marvel at perfection, for it is fleeting.
    You have brought Sin to Heaven
    And doom upon all the world.

    Easiest way would be to have a boolean that you set to true for the time your UI is open and to false for the time it is closed.
    And then you place that boolean in front of your left click event of your Character with a branch to prevent him from

    If you place the UI opening and closing Logic in your PlayerController, and the shooting logic in your PlayerCharacter, you can
    disable the PlayerCharacter Input and you should still be able to close the inventory. (then you don't need the bool).
    Open for contracted work | C++/BP (incl. Multiplayer) | Tutoring | VR

    My UE4 Blog/Page with Tutorials and more: Hit me for ALL the things!
    (Including 100+ Pages Multiplayer Network Compendium to get you started.)