Prevent text input to the code editor once thrown out of the game due to a breakpoint or error #7289
Closed
TheHorscht
started this conversation in
Editor
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
While playtesting, errors happen or breakpoints are hit, in which case sometimes the focus switches to the code editor and if using keyboard input in the game, like WASD to move and holding Space for some action, a bunch of wasd and space characters get inserted somewhere into the script, wherever the cursor last was placed.
This is really annoying and even makes it hard to realize that some part of the code just broke because random characters were inserted, because the part of the code rarely runs, and if it does, now breaks.
So I would love a solution where either the code editor doesn't get immediate focus once the user is thrown out of the game, or have a grace period of like 1 second where the text input is blocked.
In my testing that I just did it also seemed very random if the game was sent to the background and subsequently the focus went to the text editor, or if the game stayed paused in the foreground. In all cases all I did was walk straight right (only keeping the D key held down) onto a tile of my tilemap which triggered a breakpoint.
Beta Was this translation helpful? Give feedback.
All reactions