Does anyone know how I can quit the game other than the "x" in the top right corner?
call get_tree.quit()
get_tree.quit()
Moderator note: brackets missing; should be: get_tree().quit()
get_tree().quit()
//docs.godotengine.org/en/stable/tutorials/misc/handling_quit_requests.html
Thanks @Megalomaniak
But I'm not sure why this isn't working:
extends Control func _process(_delta: float) -> void: if Input.is_action_pressed("Quit"): get_tree.quit()
Input.is_action_pressed() is case-sensitive. Make sure you didn't name the action "quit" in the project settings, or change "Quit" to match the case
Input.is_action_pressed()
Thanks anyway @Azedaxen but it looks like it was just a syntax typo get_tree.quit() doesn't work. It should be:
and now it works
Yep, I just forgot to type some parenthesis in there earlier. That's what I get for posting late in the night(half asleep).