Unreal glitch?

I did a main menu where I can click play and everything and it works perfectly fine. 1 of the buttons is the instructions button and it shows instructions when I click on it. on the instructions screen I can press back to go back to the main menu. NOW when my health gets depleted to 0, a screen appears saying defeat and i made a button that says main menu so i can do the same as the instructions screen. I literally have the EXACT same blueprint as the instructions screen on the defeat screen. set input mode UI only is also there but no i cannot click on it. i use breakpoints to check if its the problem but apparently it works fine. i tried making another widget and i still cannot click on the button for main menu. why is this? the problem is not on the widget blueprint. it must be on the design part of the widget. or on the twinstickpawn event graph where i spawn the widget

Hello GitGudGitRekt,

There are a multitude of things that could be causing this. Is it possible that you’re disabling input for the player controller when your health is depleted? Do the other buttons on your widget work during this screen?

You could also try debugging your blueprints while doing this to see where the problem is. If you have two monitors this will be easier but you can have the game in one window and the blueprint in another.

Once you execute things in the blueprint, they should have an /orange glow on the execution pins to indicate them being called. This may help you narrow down the problem.

Hi, I have get player controller connected to set input mode UI only and also connected to set mouse cursor. any button I add to the that screen when my player reached 0 health, does not work, so the whole screen can’t be clicked. I added breakpoints to check everything and it does seem to actually connect correctly and stuff so I don’t know. I did the thing you told me to check the orange/ highlighting when I click play, and the orange lines seem to follow the set input mode UI only and set mouse cursor, it doesn’t follow get player controller but I don’t think it’s supposed to so I don’t see where the problem is

It would only light up the execution pins so you’re correct about it not lighting up the Get Player Controller node’s pin. Would it be possible to get some screenshots of these blueprints that are part of this functionality?

Ok so first is the picture of my victory screen which has the exact same things as the defeat screen and works perfectly fine

then the picture below is the defeat screen. I know that I made it in a function instead of custom event like the victory screen but trust me i copied it the exact same and it still didn’t work so i made it a function see if it worked thats why

The only thing that I see that could be different is that both the return value from the Create Widget node and the Set Defeat Screen node are being plugged into Add to Viewport in the Defeat Screen one. I can’t tell if it’s the same way in the Victory Screen or not. You should only need to add one of them to the viewport and ensure that the same one you add is the same one you plug into Set Input Mode UIOnly.

Also, the Victory Screen is an event while the Defeat Screen is a function. Is there any reason for that difference?

ok i see what you mean i will try pluging that add to viewport function differently. I will have access to unreal again on monday so i will asnwer you back then thank you.
And defeat screen is a function because i just wanted to try different stuff. i tried making defeat screen a normal custom event but it still didnt work so i had to try everything and made it a function thats why

Oh wow, It actually works now! I was checking what you said about the connections on add to viewport, and I changed it and then changed it back and it worked somehow. thank you so much for your patience with me and your help I am very grateful.

I would add this question as correct answer but i cant do it for the comments :confused: