If you'd rather instantiate the control UI you can move the contents of `pause` to `_ready()` and `unpause` becomes ``` animation_player.play_backwards("menu_foreground_blur") await animation_player.animation_finished get_tree().paused = false self.queue_free() ```
You can (also) use the build in show and hide functions of the main node (where the script is located) just place the hide() function in the ready method and add the show function where you open the menu. (and when closing make sure to call hide() again.
@@TheLordCurse I used an IF statement for my buttons, checking if the game is paused before doing their actions, if the game isn't paused the buttons just pass. It was the first solution I came up with as a newbie. Was wondering, do you think the solution I came up with could cause any problems in the future? Should I re-write it to use hide and show instead?
@@XareSwe That should work and I don't see issues down the line (based upon what I know, haven't seen your code, but I reckon it should be fine) I just like to use as much of the engine as possible and try to stay away from (large) if else statements, but I again in this case, I think its solid enough.
hello! Loved the tutorial but I’m having some issues, the menu works completely fine except for how it shows up on screen. When i play, the text shows up without activating the pause menu, and it’s tiny. When i open the pause menu the animation plays but the text remains small. Is there a way to fix this? Thank you either way, really liked the tutorial :) Edit: I fixed the size issue, but the menu still shows up before it’s clicked
Thanks for the video man it was really good. i had a problem when i hit my pause button the game would freeze the game. i figured it out though for people having this problem make sure on the pause menu node set the process mode to always. i found that if you don't have it set to always it would cause the menu it self would pause and lock the game up.
`get_tree().quit()` wont alert nodes that they should save state. Consider using `get_tree().root.propagate_notification(NOTIFICATION_WM_CLOSE_REQUEST) in place of get_tree().quit()` on the pause_menu script, and adding ```func _notification(what): if what == NOTIFICATION_WM_CLOSE_REQUEST: save() get_tree().quit()``` on a script responsible for saving game state
i am working on a 3d first person horror game. i used this tutorial to implement a pause menu, however i can no longer move my camera or see my mouse whilst within the menu. how would i go about fixing this? still love the tutorial tho
lmao ive been struggling on making a restart screen for my game for so long because no matter what i did the button just wouldnt activate . thank you for saying to enable "always" in the process section early on in the video because that was why mine wasn't working lol
@@Trendsthismonth it may be something in the animation player where you are setting the modulate alpha to 0 and not changing it to 255, but I'm not sure because I dont have your project
@@noo0k657 its what he does at 1:00 you click the green circle with the cross inside next to the anchor icon and select the box at the bottom right that is fully filled in.
I got it working but I'm running into an issue. I try to explain as best as I can. I only set 1 button to return to main menu. I skipped the blur animations. I press ESC, all fine, I can use pause button, then press ESC to go back to game but I can't control the player, it keeps moving by itself (I'm using a 3rd person player prefab). I press ESC again and this time I can't interact with pause menu button. I press ESC again and now I can control the player. Then this repeats... I press ESC, all fine, etc... Also, I press ESC, all fine, but then I press the button to go back to main menu, then the buttons of the main menu don't work. I think there must be something that is not reseting properly?
Ok I found a solution for half of it You do need the get_tree()paused = false if you switch from one scene to the other But on the animation you need to make it on second 0 not visible And on second 0.001 make it visible This should be done to the top node and it's so you can click buttons
is it possible to make the shader also blur different canvas layers? Cause I have like health bars etc and they are not getting blurred :( btw great tutorial!
you may need to tweak the 'z-index' property of your canvas layers so the blur appears on top of what you want to blur and the health bars are below, sorry for the late response
It works for me! for that thanks a lot brother!! but i don't know why i am getting something different i don't know why every time i jump for a very split second the pause menu shows it self and disappear can you fix it?
on 0:52, process should be always but the container should be when paused because if not they overlay permanently in the middle of the screen even if invisible, so a player could click the quit button even if not there visibly minor edit: If your making a button that goes to start/controls (Basically any scene) be sure to add this func _ready(): get_tree().paused = false pass That way the buttons work And i think you could just change the user interface node with a canvas layer, that way you have 1 less node in the other scenes
@@jameslionbreath I asked it as my own comment but I copypaste here as I can't quote other comments... hopefully you have any idea about how to fix it? I only set 1 button to return to main menu. I skipped the blur animations. I press ESC, all fine, I can use pause button, then press ESC to go back to game but I can't control the player, it keeps moving by itself (I'm using a 3rd person player prefab). I press ESC again and this time I can't interact with pause menu button. I press ESC again and now I can control the player. Then this repeats... I press ESC, all fine, etc... Also, I press ESC, all fine, but then I press the button to go back to main menu, then the buttons of the main menu don't work.
@@AnamuraUniversewell idk why it doesn't work fully so ail just post the code extends Control func _ready(): $AnimationPlayer.play("RESET") func resume(): get_tree().paused = false $AnimationPlayer.play_backwards("blur") func pause(): get_tree().paused = true $AnimationPlayer.play("blur") func testEsc(): if Input.is_action_just_pressed("esc") and !get_tree().paused: pause() elif Input.is_action_just_pressed("esc") and get_tree().paused: resume() func _process(delta): testEsc() func _on_resume_pressed(): resume() func _on_quit_pressed(): get_tree().quit() func _on_restart_pressed(): resume() get_tree().reload_current_scene() pass # Replace with function body. func _on_home_pressed(): ##optional #get_tree().paused = false get_tree().change_scene_to_file("res://Menus/StartScreen.tscn") pass # Replace with function body.
when I resume the game for some reason when I jump the pause menu keeps showing up but not pausing the game or anything just getting in the way. Anyone can help me with that. Also if anyone knows a way I can implement the quit button so that it quits the current level you are in a game and go back to the level select of a game
I'm experiencing the same problem! Did you ever figure it out? I've been looking over the code but I can't figure out why the mnu shows up every time I jump. Edit: I gave it a bandaid fix by turning off the visibility at the beginning of the animation and then an instant later turning the visibility back on in the animation player. I'm sure it's not the most sophisticated way of going about it, but it seemed to work!
@@alexandrelegrand7833 If it is still valued for you, I found another solution. Problem appeared after pressing Resume button and if I pressed Space/Jump in gameplay my Pause menu popped up for a second. Here is. Just in function Resume add animation.play("RESET"). It works to me. func resume(): get_tree().paused = false animation.play_backwards("pause_menu_start") animation.play("RESET") PS. I used @onready with variable to link my Animation Player and called it just "animation". Like this: @onready var animation = $AnimationPlayer
I'm having this issue where I added a button instead of quit to level selector but when I pause and select it, it switches scenes and when i select any level the game remains in that same pause position until i press escape which would allow it to run normally which is weird I think its because of the Control-Mode- Always idk if thats what messing with it but is there a way to fix this. Thank you in advanced nice tutorial btw everything else worked perfectly fine its just this thats messing up.
@@kobedev my lil bro figured it out lmao but for anyone who'd like to use a button to exit the scene to go to a level selector or any other scene you can use this script func _on_button_3_pressed(): get_tree().paused = false PauseMenu.visible = false get_tree().change_scene_to_file("res://Level selector.tscn") Ye welcome and thanks bro
well instead of changing the modularity of the actual pause menu, you can instead not do anything and just create a timer for how long you want the effect to last, and call resume() after
I'd be happy to help you out with your issue if you need help, it works on my projects so I'm not sure if something specific to you is conflicting with my code or if you missed a step in the tutorial
doesnt work at all :c it just does nothin on restart and resume :c do you have something more set for pause function??? doesnt the main in game node need any code to run it??
My source code is in the description so if you are running into issues you could try copy pasting that in your script, the main root node doesnt need code to run it if you drag and drop the node in your scene
I know it's been a while but hoping you can help. Everything works fine, but when I add the pause menu to my main screen it basically disables the other elements on the screen. The game definitely pauses and restarts, but I can't click the button that was on the main screen. When I disable the pause menu it works again.
you will need to set any other elements you want working while the game is paused to be 'Always' processing, you can find this setting at the bottom of any node in the editor properties
@@kobedev Any ideas as to why adding the Pause Menu script to my main scene would disable mouse input unless I alt tab back into my running project? Couldn't find any answers via google. My player script has mouse movement its a 3D SCENE, I have put a canvas layer and pause menu in my main scene with the same exact code. I deleted the entire code as a test measure but soon as I put a canvas layer+pause screen it freezes up the mouse movement until I tab back in hmm.. Also tried making the root node a node3d.
This works but it blocks, for example, background music. It also blocks certain effects (e.g., tweeting) in the pause menu itself. The problem is using get_tree().paused but I do not have a solution to this.
if you saved your pause module it will be down in the file system below the node list, drag your pause node you named that ends with .tscn onto your 'main'
Could be several things. 1) Check if you're starting the correct scene. Check the buttons on the top right, one is "run project" that will run whatever is set as the main scene, while a button further to the right is "run current scene" and that one will start whichever is active on your screen right now. To change the main scene, right click on the scene you want your game to launch and click "set as main scene" in the drop down menu. 2) If the menu is not set to always process, which will pause its execution when the game is paused. Your menu itself being paused would prevent you from using it to unpause it. Select your menu's top node and near the bottom in the inspector is a "mode" option you should set to always, as demonstrated in the video at 0:40. 3) Your buttons don't trigger the script. Make sure they're connected. They should all have a kind of wifi signal icon to the right in your scene hierarchy/node tree. If they do, then it's an error in your code. Good luck troubleshooting !
My pause menu disappears immediately after showing up. I suspect its the animation resetting but I am not able to figure out how to fix it. Does anyone have any ideas?
nvm my dumb ass was using && between the if conditions, javascript habit worked by adding this -> if Input.is_action_just_pressed("escape_menu") and !get_tree().paused:
i followed every steps u told but when i pressed esc it won't pop up the pause screen. IDK why but from the past 5 hours i kept trying to make a solution for the ending of my game, for example : change level 1 to level 2 (it's not working) and then i tried this method to exit my game but it's also not working. Can somebody help
If you have any trouble, I have code linked in the description that may help if you missed a small detail in the project settings or something, also I have found when switching scenes you sometimes have to call get_tree.reload_current_scene() (or reload_scene() i cant remember which one is right)
So, for some reason when I hit escape, the menu pops up and all the buttons work. But if I hit escape again? Nothing happens. Any idea what's wrong with that?
I forgot to post back here when I figured that out, but yeah, that was it. I had to check the details of the PauseMenu and make sure it was set to "Always On".
technically i didnt change anything, the logic is the same, but on the line above i had get_tree().paused == false:, you can also write this as !get_tree().paused:
@@nekyo7 not exactly sure what you mean by follow the player since when it’s paused the player shouldn’t move. If you have a fixed screen and want the pause menu to be above the player or something when you pause it, I would probably get the position of the player in the world then get the equivalent screen position and then set the position of the pause menu vboxcontainer to that position
@@kobedev sorry fixed that somehow, and now it comes on screen wherever I go, but it is like on the corner of the window and only blurs that specific area I tried to fix it at center by changing its position in both the pause menu node in main scene and the panel container and color rect node in pause_menu scene. I tried doing different stuff and even try to fix it with code but nothing works, what do I do?
I think the UA-cam algorithm is doing a better job at recommending small channels. Good luck!
yeah ive been thinking just that recently, maybe it's because I am one myself and I follow many others like me or YT changed something!
@@kobedev Please bring long "Basis To Advance" video for shaders in Godot 🥺
BTW this tutorial is very helpful 😀 thanks :)
@@fictionalaudio noted, going in the idea list
If you'd rather instantiate the control UI you can move the contents of `pause` to `_ready()` and `unpause` becomes
``` animation_player.play_backwards("menu_foreground_blur")
await animation_player.animation_finished
get_tree().paused = false
self.queue_free() ```
The issue with this setup is that it is still there... Even though you can't see it and you can still click on the buttons. How do we fix that?
You can (also) use the build in show and hide functions of the main node (where the script is located) just place the hide() function in the ready method and add the show function where you open the menu. (and when closing make sure to call hide() again.
@@TheLordCurse I used an IF statement for my buttons, checking if the game is paused before doing their actions, if the game isn't paused the buttons just pass. It was the first solution I came up with as a newbie. Was wondering, do you think the solution I came up with could cause any problems in the future? Should I re-write it to use hide and show instead?
@@XareSwe That should work and I don't see issues down the line (based upon what I know, haven't seen your code, but I reckon it should be fine) I just like to use as much of the engine as possible and try to stay away from (large) if else statements, but I again in this case, I think its solid enough.
@@TheLordCurse thank you buddy
finally i search for something and youtube gives me gold like this..appreciate the vid mn :)
even though I didn't need pausing menu it was very helpful with making my inventory UI. man how hard it is?! Good tutorial man!
Thanks bro! More to come definitely!
hello! Loved the tutorial but I’m having some issues, the menu works completely fine except for how it shows up on screen. When i play, the text shows up without activating the pause menu, and it’s tiny. When i open the pause menu the animation plays but the text remains small. Is there a way to fix this? Thank you either way, really liked the tutorial :)
Edit: I fixed the size issue, but the menu still shows up before it’s clicked
Thanks for the video man it was really good. i had a problem when i hit my pause button the game would freeze the game. i figured it out though for people having this problem make sure on the pause menu node set the process mode to always. i found that if you don't have it set to always it would cause the menu it self would pause and lock the game up.
I thought i was tripping when I heard the stardew valley music
Hell yea brother, this helped me squash a bug I was experiencing for like 2 days. Tysm!
Same here! I watched a few videos on pause and nothing worked. It really put my project development on pause 🎉
Love it guys, definitely makes my day to see my (limited) knowledge getting passed to others
Oh nooo the punnn, well executed though I’ll give you that
What did you do with the layout/ theme override for your menu or did you use any of that?
The best way I can explain this tutorial is easy to digest. Very good tutorial, keep it up! ❤
`get_tree().quit()` wont alert nodes that they should save state.
Consider using `get_tree().root.propagate_notification(NOTIFICATION_WM_CLOSE_REQUEST) in place of get_tree().quit()` on the pause_menu script, and adding
```func _notification(what):
if what == NOTIFICATION_WM_CLOSE_REQUEST:
save()
get_tree().quit()```
on a script responsible for saving game state
Thanks for the videos brother, could you bring a video explaining how to enter/use some type of vehicle? whether horse, car, etc.
I think that may be a bit too specific for a tutorial but maybe just a 2d or 3D car tutorial would be a cool ideo
i am working on a 3d first person horror game. i used this tutorial to implement a pause menu, however i can no longer move my camera or see my mouse whilst within the menu. how would i go about fixing this?
still love the tutorial tho
Thanks Man! Amazing tutorial helped alot
lmao ive been struggling on making a restart screen for my game for so long because no matter what i did the button just wouldnt activate . thank you for saying to enable "always" in the process section early on in the video because that was why mine wasn't working lol
I have an issue. when I pause my game I cant unpause it. I can press esc and it pauses fine but when I press it again nothing happens.
This is so helpful. Thank you.
I was able to get it working. Thanks!
No worries man I was just about to respond to your other comment haha!
@@kobedev okay thank you. Even though it is invisible I can still click on it. How do I fix that?
@@Trendsthismonth it may be something in the animation player where you are setting the modulate alpha to 0 and not changing it to 255, but I'm not sure because I dont have your project
thanks, my firend
I mean. it pauses, but the buttons dont show up and the button dont even move because their container defines their position
It's up to you to add the game 'juices' as we like to call it, if I included this in the video it would be too complicated for the base knowledge.
Thanks man! Helped me create my death screen UI!! Great tutorial!
How do i change the button to the center???????? why did you cut that part??????????????
Select the panel container and then click the anchor presets and select Full Rect
in the VBoxContainer you can set the alignment to center then you can go into Theme Overrides -> constraints and add separation.
@@S2NJJ hey how do i make the button full rect?
@@noo0k657 its what he does at 1:00 you click the green circle with the cross inside next to the anchor icon and select the box at the bottom right that is fully filled in.
I got it working but I'm running into an issue. I try to explain as best as I can. I only set 1 button to return to main menu. I skipped the blur animations.
I press ESC, all fine, I can use pause button, then press ESC to go back to game but I can't control the player, it keeps moving by itself (I'm using a 3rd person player prefab). I press ESC again and this time I can't interact with pause menu button. I press ESC again and now I can control the player. Then this repeats... I press ESC, all fine, etc...
Also, I press ESC, all fine, but then I press the button to go back to main menu, then the buttons of the main menu don't work.
I think there must be something that is not reseting properly?
Ok I found a solution for half of it
You do need the get_tree()paused = false if you switch from one scene to the other
But on the animation you need to make it on second 0 not visible
And on second 0.001 make it visible
This should be done to the top node and it's so you can click buttons
is it possible to make the shader also blur different canvas layers? Cause I have like health bars etc and they are not getting blurred :(
btw great tutorial!
you may need to tweak the 'z-index' property of your canvas layers so the blur appears on top of what you want to blur and the health bars are below, sorry for the late response
It works for me! for that thanks a lot brother!! but i don't know why i am getting something different i don't know why every time i jump for a very split second the pause menu shows it self and disappear can you fix it?
Yeah I have the same problem
It when I click to space button or enter
@@alexandrelegrand7833me too!
on 0:52, process should be always but the container should be when paused
because if not they overlay permanently in the middle of the screen even if invisible, so a player could click the quit button even if not there visibly
minor edit:
If your making a button that goes to start/controls (Basically any scene) be sure to add this
func _ready():
get_tree().paused = false
pass
That way the buttons work
And i think you could just change the user interface node with a canvas layer, that way you have 1 less node in the other scenes
I had a feeling this could be my issue but sadly I add this and I don't see any difference :(
@@AnamuraUniverse what kind of issue are you having?
@@jameslionbreath I asked it as my own comment but I copypaste here as I can't quote other comments... hopefully you have any idea about how to fix it?
I only set 1 button to return to main menu. I skipped the blur animations.
I press ESC, all fine, I can use pause button, then press ESC to go back to game but I can't control the player, it keeps moving by itself (I'm using a 3rd person player prefab). I press ESC again and this time I can't interact with pause menu button. I press ESC again and now I can control the player. Then this repeats... I press ESC, all fine, etc...
Also, I press ESC, all fine, but then I press the button to go back to main menu, then the buttons of the main menu don't work.
@@AnamuraUniversewell idk why it doesn't work fully so ail just post the code
extends Control
func _ready():
$AnimationPlayer.play("RESET")
func resume():
get_tree().paused = false
$AnimationPlayer.play_backwards("blur")
func pause():
get_tree().paused = true
$AnimationPlayer.play("blur")
func testEsc():
if Input.is_action_just_pressed("esc") and !get_tree().paused:
pause()
elif Input.is_action_just_pressed("esc") and get_tree().paused:
resume()
func _process(delta):
testEsc()
func _on_resume_pressed():
resume()
func _on_quit_pressed():
get_tree().quit()
func _on_restart_pressed():
resume()
get_tree().reload_current_scene()
pass # Replace with function body.
func _on_home_pressed():
##optional
#get_tree().paused = false
get_tree().change_scene_to_file("res://Menus/StartScreen.tscn")
pass # Replace with function body.
when I resume the game for some reason when I jump the pause menu keeps showing up but not pausing the game or anything just getting in the way. Anyone can help me with that. Also if anyone knows a way I can implement the quit button so that it quits the current level you are in a game and go back to the level select of a game
I'm experiencing the same problem! Did you ever figure it out? I've been looking over the code but I can't figure out why the mnu shows up every time I jump.
Edit: I gave it a bandaid fix by turning off the visibility at the beginning of the animation and then an instant later turning the visibility back on in the animation player. I'm sure it's not the most sophisticated way of going about it, but it seemed to work!
@@posconn6374 Thank you man, It worked for me too! I dunno how one should "really" solve it, but you helped me alot, thanks!
@@MisterPineTree No problem! Glad I could be of assistance!
@@posconn6374sorry but I don't really understand
Can you explain how?
@@alexandrelegrand7833 If it is still valued for you, I found another solution. Problem appeared after pressing Resume button and if I pressed Space/Jump in gameplay my Pause menu popped up for a second. Here is. Just in function Resume add animation.play("RESET"). It works to me.
func resume():
get_tree().paused = false
animation.play_backwards("pause_menu_start")
animation.play("RESET")
PS. I used @onready with variable to link my Animation Player and called it just "animation". Like this:
@onready var animation = $AnimationPlayer
I'm having this issue where I added a button instead of quit to level selector but when I pause and select it, it switches scenes and when i select any level the game remains in that same pause position until i press escape which would allow it to run normally which is weird I think its because of the Control-Mode- Always idk if thats what messing with it but is there a way to fix this. Thank you in advanced nice tutorial btw everything else worked perfectly fine its just this thats messing up.
So after you switch scenes you can try reloading the scene or setting the paused mode to be false
@@kobedev my lil bro figured it out lmao but for anyone who'd like to use a button to exit the scene to go to a level selector or any other scene you can use this script
func _on_button_3_pressed():
get_tree().paused = false
PauseMenu.visible = false
get_tree().change_scene_to_file("res://Level selector.tscn")
Ye welcome and thanks bro
@@whiteshadow3841 Thank you, that helped me.
even though you cant see the pause menu, you can still click on the buttons. how to fix it?
Make sure the visibility is off not just modulate set to transparent
quick question, how would one use this or something similar to create a timestop effect?
well instead of changing the modularity of the actual pause menu, you can instead not do anything and just create a timer for how long you want the effect to last, and call resume() after
It says that the node is not found: AnimationPlayer relative to CanvasLayer/PauseMenu. How to fix that?
Make sure you’ve spelt it right and if you’ve renamed the animation player or if it is a child of something else
Wooowww brooo great tutorial just broke my entire game
I'd be happy to help you out with your issue if you need help, it works on my projects so I'm not sure if something specific to you is conflicting with my code or if you missed a step in the tutorial
doesnt work at all :c it just does nothin on restart and resume :c do you have something more set for pause function??? doesnt the main in game node need any code to run it??
My source code is in the description so if you are running into issues you could try copy pasting that in your script, the main root node doesnt need code to run it if you drag and drop the node in your scene
I know it's been a while but hoping you can help. Everything works fine, but when I add the pause menu to my main screen it basically disables the other elements on the screen. The game definitely pauses and restarts, but I can't click the button that was on the main screen. When I disable the pause menu it works again.
you will need to set any other elements you want working while the game is paused to be 'Always' processing, you can find this setting at the bottom of any node in the editor properties
@@kobedev Any ideas as to why adding the Pause Menu script to my main scene would disable mouse input unless I alt tab back into my running project?
Couldn't find any answers via google. My player script has mouse movement its a 3D SCENE, I have put a canvas layer and pause menu in my main scene with the same exact code.
I deleted the entire code as a test measure but soon as I put a canvas layer+pause screen it freezes up the mouse movement until I tab back in hmm..
Also tried making the root node a node3d.
I FIGURED IT OUT THE CONTROL NODE HAD MOUSE AS "STOP"
This works but it blocks, for example, background music.
It also blocks certain effects (e.g., tweeting) in the pause menu itself. The problem is using get_tree().paused but I do not have a solution to this.
You need to set the process mode of ANYTHING you want working when the game is paused to “always” this can be found in the editor settings
Thank you for your video
thank you!
Is it working in 3d as well?
Yes, Control nodes are basically 2D and you can use them in 2D and 3D.
why am i still able to click all the buttons even when my game is not paused
If you have any trouble, I have code linked in the description that may help if you missed a small detail in the project settings or something
4:13 how to "drop" the pause to main?
if you saved your pause module it will be down in the file system below the node list, drag your pause node you named that ends with .tscn onto your 'main'
not working
I followed everything but when I open game the menu is just stuck there in middle of screen 😭 what did I do wrong ?
Could be several things.
1) Check if you're starting the correct scene. Check the buttons on the top right, one is "run project" that will run whatever is set as the main scene, while a button further to the right is "run current scene" and that one will start whichever is active on your screen right now. To change the main scene, right click on the scene you want your game to launch and click "set as main scene" in the drop down menu.
2) If the menu is not set to always process, which will pause its execution when the game is paused. Your menu itself being paused would prevent you from using it to unpause it. Select your menu's top node and near the bottom in the inspector is a "mode" option you should set to always, as demonstrated in the video at 0:40.
3) Your buttons don't trigger the script. Make sure they're connected. They should all have a kind of wifi signal icon to the right in your scene hierarchy/node tree. If they do, then it's an error in your code.
Good luck troubleshooting !
My pause menu disappears immediately after showing up. I suspect its the animation resetting but I am not able to figure out how to fix it. Does anyone have any ideas?
nvm my dumb ass was using && between the if conditions, javascript habit
worked by adding this -> if Input.is_action_just_pressed("escape_menu") and !get_tree().paused:
i followed every steps u told but when i pressed esc it won't pop up the pause screen. IDK why but from the past 5 hours i kept trying to make a solution for the ending of my game, for example : change level 1 to level 2 (it's not working) and then i tried this method to exit my game but it's also not working. Can somebody help
If you have any trouble, I have code linked in the description that may help if you missed a small detail in the project settings or something, also I have found when switching scenes you sometimes have to call get_tree.reload_current_scene() (or reload_scene() i cant remember which one is right)
hey man this was awesome, thankyou
0:39 The part that Nobody wants to show.
Hi, I followed your video but when I play the game,
-the menu just open by itself
-the menu won't go away even when i press the resume button
help
If you have any trouble, I have code linked in the description that may help if you missed a small detail in the project settings or something
@@kobedev thank for answering man, I found out that you have to press the hide button on the menu for it to go away. The rest is history after that
@@iamoldop no worries, nice to see you got it figured out, sorry for not replying earlier, first time I checked comments in a while
@@iamoldopI’m having the same issue, but I don’t seem to be able to solve it, did you just hide the pause menu node?
@@goncalobernardes7896 ye
Your thumbnail is misleading. Your video does contain a button that goes back to the main menu.
Lol 😂
Why so fast fast and horrible fast moving with the mouse, why not explain in details. Slow down please I need to understand.
So, for some reason when I hit escape, the menu pops up and all the buttons work. But if I hit escape again? Nothing happens. Any idea what's wrong with that?
The node that the script is starched to might not be set to always process
I forgot to post back here when I figured that out, but yeah, that was it. I had to check the details of the PauseMenu and make sure it was set to "Always On".
hey the pause menu is visable in the screen and when i hit pause only the world pause with the menu on my screen
If you have any trouble, I have code linked in the description that may help if you missed a small detail in the project settings or something
Very easy!
i can still click on the buttons with a mouse when the menu is away, so how do i fix that ?
Make sure you set the visibility to false
stardew music already gigachad
3:19 you change the == to ! so how is it then ?
technically i didnt change anything, the logic is the same, but on the line above i had get_tree().paused == false:, you can also write this as !get_tree().paused:
Good video but too fast and some explaining could help me in the long term
Sick. gj man
Came for the tutorial, stayed for the Stardew Valley music
hell yeah
alguien me puede ayudar tengo algunos problemas
¿Que es problemas?
Thnak you :)
great thx
thank you boss
unhiged tutorial
Это просто пиздец, зачем только ютуб такое пушит???? Наверное один из худших гайдов, что я видел в своей жизни
Нихрена не понятно. Всё обрезано. Всё скомкано. Что там у тебя вообще происходит?! Ничерта неясно
one of the worst tutorials ever seen
👍Thanks fortclipshow1626 for the kind comment!
@@kobedev hey man amazing video but i have a problem. How do you make the pause menu follow player it works otherwise
@@nekyo7 not exactly sure what you mean by follow the player since when it’s paused the player shouldn’t move. If you have a fixed screen and want the pause menu to be above the player or something when you pause it, I would probably get the position of the player in the world then get the equivalent screen position and then set the position of the pause menu vboxcontainer to that position
@@kobedev sorry fixed that somehow, and now it comes on screen wherever I go, but it is like on the corner of the window and only blurs that specific area I tried to fix it at center by changing its position in both the pause menu node in main scene and the panel container and color rect node in pause_menu scene. I tried doing different stuff and even try to fix it with code but nothing works, what do I do?
@@nekyo7 try downloading my project files and save the pause menu scene as your own scene in your game
thanks
mate
VeryCool
Poggers
Usefull
Save
Absolute Chad
SavedMeAfterABadTutorial
AbsolutlySavedMyGame
PoggersBlur
AbsolutePauseSaver
Thanks!
No worries mate!