Does the issue occur in the editor or during gameplay?
If it's a gameplay issue, please specify which movement system and camera type you're using (free movement vs. grid movement, third-person vs. first-person) or N/A if not applicable:
Briefly describe the issue you're experiencing:
If you try to make a toggle pause key, it will not let you unpause the game. The game stops registering the pause key once the key is pressed.
Here's the script:
if player.property["is_paused"] != true then
pause_game();
player.property["is_paused"] = true;
else
resume_game();
player.property["is_paused"] = false;
end;
This is assigned to a key press and should toggle pause/unpause....but instead, when its used to pause...it pauses the game but then no subsequent presses of that key register the script.
For example, placing a print at the top of the script to just check if it even executes does not do so.
The pause event from the key press has stopped the key or it's script from running.
You can unpause by forcing it using the console (resume_game), and also, just to note, this issue doesnt exist on widget buttons.
The same script, placed on a UI button works fine, but on a keyboard key does not.
Are there any errors in the in-game debug console or external console window?
Provide the steps necessary to reproduce the issue:
- bind the above script to a key press
- play the game
- press the key to pause
- now try to resume the game with the same key.....
Provide a download link to the bare bones project (strongly recommended if it's an in-game issue, since this helps significantly when attempting to reproduce it; the report will also be given more priority in this case):