Resume Not Working As Intended
While working on the pause functionality I ran into an error of resume not triggering when the player pressed the pause key again after the initial pause press. This was problematic since once the game was paused a player could not continue playing and their only option would be to quit the game, which is not what was intended. Allowing the player control of stopping the game so they can access options or simply take a break is important to the user experience and would cause the user a lot of irritation if pausing the game does not function as intended.
After doing some debugging and
concluding it was not a logic issue. I turned to unreal documentation and forum
since I suspected I might need to turn on something. This turned out to be true.
Unreal Engine, by default, doesn't execute inputs when the game is paused. The
input needs to have its "execute when paused" to be true for it to work.
Once I had turned on the pause inputs "execute when paused" the games pausing functionality acted as intended. Now
when pause is pressed the game is set to pause and the pause menu shows. When
the pause button is pressed again the menu is removed and the game resumes.
Author: Krishnie Katie Naidoo
Posted on 9/15/2023
Comments
Post a Comment