Quit issue Project Boost

Quit code works in the editor, but not when exported.

My code:

if Input.is_action_just_pressed(“ui_cancel”):
print(“cancel”)
get_tree().quit()

“cancel” shows in the editor debug, but not on export.

It’s as if the key press is missed

I make sure the window has focus and that nothing else is happening.

Godot 4.1.2 / Win 10

I hope you can help

1 Like

Hi, I think you have placed this message in the wrong forum.

1 Like

Moved it to ‘Other Courses’ which should include Godot.

Hi Peter,

I’ve tried this in my project using 4.1.1 and used the projectboost_console.exe to get the print statement to show as well and this is working fine for me when pressing the escape key to exit the game.

I double checked with Bramwell as admittedly i am a little rusty with godot in case ui_cancel was a editor only input action but as he corrrected me it is a native input event so it should work. It would be a pretty big bug in the engine if 4.1.2 was at fault here.

I wonder if when you run the projectboost_console.exe you get any other messages when you press escape in the game window or any other messages in the console that might give a clue as to why this is not working for you.

If you have any more information on this please do let me know or we can take a closer look at your project by zipping the project folder and uploading it by the following link and letting me know here that it has been uploaded.

Thanks

https://gdev.tv/projectupload

Many thanks for the reply. There were no other messages in projectboost_console.exe. There should be the word ‘cancel’ from a print command.

Cheers

peterC

ive just installed 4.1.2 and tested, seems to work for me when exporting to a windows .exe file.

any chance of looking at your project please Peter, if you could either pop it up where Marc suggested, or online so we can grab the zip and have a look for you.

Any update Peter if you got to the bottom of it?

I haven’t taken it further because I’ve concluded it is just something quirky related to versions but unrelated to learning.

Many thanks for checking back.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms