![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | ThewExtreme |
hello guys I have a probelm on my pause menu. I’m beginner on english and making game. so acually Im trying different something, my pause menu working like this (I wanna work like this):
extends Node2D
var abd = 0
func _process(delta):
if Input.is_action_just_pressed("Pause") :
abd = 1
if abd == 1:
$Control.visible = true
get_tree().paused = true
abd -= 0
elif abd == 0:
get_tree().paused = false
abd -= 1
elif part is not important for now I was think there but I forget. İf you want u can tell me
and this code aim:
visible = true (this my pause menu)
get_tree().pause (and this is will stop game)
ım using “var” cause this code part is Global.
and I wanna work resume button.
my resume button codies like that:
extends Button
func _process(delta):
if PalyerGlobal.abd == 1:
get_tree().paused = false
pass # Replace with function body.
func _on_Button_pressed():
$"../../../..".visible = false
PalyerGlobal.abd = 0
pass # Replace with function body.
if you didnt understand me my Discord GM#8081 u can find me from there and we can talk on discord I can show u my screen (godot :))
thank for your help and care have nice day !!