You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
acatthatcanparkourreallywell9900 brought to my attention,
that trying to close a chest via ESC in tickrate 1 would fail sometimes,
if the press was really short and also provided this video (thanks for that!):
ScribbleTAS
changed the title
Pressing a button in a single frame is not recognised in Gui-Screens
Pressing ESC runs twice
Mar 30, 2025
ScribbleTAS
changed the title
Pressing ESC runs twice
Pressing ESC to close a gui screen opens the ingame menu
Mar 30, 2025
ScribbleTAS
changed the title
Pressing ESC to close a gui screen opens the ingame menu
Pressing ESC opens the ingame menu instead of closing the current gui
Mar 30, 2025
Ok, this bug is pretty interesting and a good lesson as to why a quick fix is probably not a good idea...
Back in PR #225 I fixed an issue where I subticks were not recorded... So I wrote:
What a weird oversight
[...]
Reason was that nextTickKeyboard (and Mouse) is called twice when a GuiScreen is open.
Thanks past me, but instead of applying a quick fix, you should've looked at this a little more carefully.
Because I didn't answer the question: "Why is it even being called twice?"
The reason is in some rare occasions, the gui input code and the movement input code can indeed run twice... All these years in alpha, I did not think this can happen...
And we also have the answer as to why ESC opens the pause menu instead of closing the current gui screen:
The gui code, runs before the movement code in the tick code. And the gui code handles what to do, if ESC is pressed and that is just closing the screen. And in the movement code after that, the code handles the case that ESC opens the pause menu.
And since TASmod runs both of these cases, the screen is indeed closed and then the ingame menu opens just after...
And this has been in the code for a couple of years I reckon...
acatthatcanparkourreallywell9900 brought to my attention,
that trying to close a chest via ESC in tickrate 1 would fail sometimes,
if the press was really short and also provided this video (thanks for that!):
https://youtu.be/T2SwdHS4jGM
After further testing I found that it is reproducible with the following inputs:
There is only a single frame, where ESC was pressed, and the Gui would not close after the second press.
Now after changing the inputs to this:
0|||null;null 1|||-232.35078;23.550083 2||;0,-56,-32|-87.000725;31.050087 3||;0,-56,-32|-87.000725;31.050087 4||;0,-56,-32|-87.000725;31.050087 5||;0,-56,-32|-87.000725;31.050087 6|ESC;|;0,-56,-32|-87.000725;31.050087 1|;|| +7|ESC|;0,-56,-32|-87.000725;31.050087 8||;0,-56,-32|-87.000725;31.050087 9||;0,-56,-32|-87.000725;31.050087 10|ESC;|;0,-56,-32|-87.000725;31.050087 1|;|| 11||;0,-56,-32|-87.000725;31.050087 12||;0,-56,-32|-87.000725;31.050087
It now works which is to be expected.
However, I also found out that this also works:
0|||null;null 1|||-232.35078;23.550083 2||;0,-56,-32|-87.000725;31.050087 3||;0,-56,-32|-87.000725;31.050087 4||;0,-56,-32|-87.000725;31.050087 5||;0,-56,-32|-87.000725;31.050087 6|ESC;|;0,-56,-32|-87.000725;31.050087 + 1||| 7||;0,-56,-32|-87.000725;31.050087 8||;0,-56,-32|-87.000725;31.050087 9||;0,-56,-32|-87.000725;31.050087 10|ESC;|;0,-56,-32|-87.000725;31.050087 1|;|| 11||;0,-56,-32|-87.000725;31.050087 12||;0,-56,-32|-87.000725;31.050087
I have only removed a semicolon here...
So it seems that guis can't handle empty input sections which is interesting...
The text was updated successfully, but these errors were encountered: