how to implement boolean variable to disable mouse input

i’m veryyy new to blueprints so sorry if this is obvious. i added dialogue first in my interaction system but I want my interact key (e) to apply to other things also. however i cant figure out how to only have it show my mouse cursor when im in dialogue.
i tried to add a boolean variable as you can see in the image, but i’m not entirely sure how to use them properly.
with that line of code in the image it doesn’t show the mouse cursor, but still opens the dialogue.

In your game mode or character class on begin play you could call “set show mouse cursor” node I believe it’s called, and hide the cursor. I believe it’s a function of the player controller class. And on construction of your dialogue widget(assuming it’s widget based) do the same but show the mouse cursor. Then again on destruct hide cursor


this is in my BP First person character.
i can normally get the dialogue to open fine, use my cursor, and have it go away when i close
dialogue. but when i interact with something that doesn’t have dialogue it still locks my mouse as if im in the widget.

in the image you posted, is the talking bool variable connected to branch?