i cant get my pause menu to open after Ive closed it
Asked Answered
L

2

0

I cant get my pause menu to open

my code:

extends Control

var pause_menu: Control

func _ready():
	pause_menu = get_node(".") as Control

	if Input.is_action_pressed("ui_cancel"):
		Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
		pause_menu.visible = true

func _on_resume_pressed():
		Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
		pause_menu.visible = false

func _on_optsions_pressed():
	print("NO!?")

func _on_quit_pressed():
	get_tree().change_scene_to_file("res://scenes/menus/main_menu.tscn")
Lancey answered 6/5, 2023 at 16:21 Comment(0)
L
0

lol i fixed it on my own kinda new to godot i just needed to put the imputs in to a new func :/

Lancey answered 6/5, 2023 at 16:29 Comment(0)
L
0

basicly when i press ESC nothing happens

Lancey answered 6/5, 2023 at 16:24 Comment(0)
L
0

lol i fixed it on my own kinda new to godot i just needed to put the imputs in to a new func :/

Lancey answered 6/5, 2023 at 16:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.