I Want to Be Able to Unpause Game with Same Button Used to Pause It. I Tried to Create a Blueprint, But It Doesn't Work.
I'm attempting to make it so that the same button to pause the game is the same one that's used to unpause it.
The game can still pause and the menu functions perfectly, I just can't figure out how to make it so that pressing it a second time exits the menu, while also resetting it so that I can pause it again.
I'm also a beginner at this, so, I don't know much of the terminology or functions yet.
Help would be appreciated.
asked Oct 19 '18 at 09:24 AM in Blueprint Scripting
in the script you show the reference you are using is wrong. basically you are creating the widget then when you try to get rid of it you are creating another widget and destroying the new one, put simply you create 2 widgets and destroy one for a net of one. what you need to do is to have a reference to the first widget you create so that you can later destroy that one. to do this you may want to select the return value pin on the create widget node and promote to variable. another issue you may also be having is that you need to select your input event and make sure that it can execute when paused.
Follow this question
Once you sign in you will be able to subscribe for any updates here