Hello,
I have a game that implements the left mouse button click as a firing event. While the button is pressed, it should continue to fire projectiles until it is released. Then, when the player looses all hitpoints, a death animation plays and a “Game Over” menu pops up with options to restart the game or quit the level.
It’s when I restart the game that the issue starts. I can hold down the left mouse button and fire after restarting the game, but if I let go of it and then try to press and hold it again, it doesn’t work. I noticed I can only get the “gate” to open if I double click with the left mouse button and hold. Does anyone have any suggestions as to why this is happening and how to address it?
Attached are my blueprints for the Firing event in my player pawn and controller class, and my restart button for the menu.
From what I could find, the issue had to do with a part of my level blueprint where I was switching the input control to the menu only and the Set Show Mouse Cursor was somehow interfering with the input when I selected restart. I was able to get it working by using the following in my level blueprint: