Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Amateur.game.dev. |
Basically, I’ve created a popup pause menu for my game, which works just fine, but then I created a separate scene for the options but it doesn’t seem to work.
- Here is the pause menu script:
extends Popup
var notPaused = true
func _process(_delta):
if Input.is_action_just_pressed(“Pause”):
if notPaused:
get_tree().paused = true
notPaused = false
visible = true
- Here is the options screen script:
extends Button
var options_screen = preload (“res://options_screen.tscn”)
func on_button_pressed(options):
get_tree().change_scene(options_screen)
I believe that i have used an incorrect function but do not know what about is wrong. Could someone please help?