How To Make A Settings Menu in Godot

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ธ.ค. 2024

ความคิดเห็น • 52

  • @cyzaine
    @cyzaine 2 ปีที่แล้ว +4

    Beautifully done. I learned alot from this! Thanks.

  • @CobainSnake
    @CobainSnake ปีที่แล้ว +2

    I know this is a year old - haven't gotten all the way through it yet, but if you update your Save Settings when you close the Setting Menu, that will reduce the calls you need that you are currently making in your Global Settings script.
    Hope that idea helps you :)
    Everything else was great here (and in the live version)

  • @F4ngb0n3
    @F4ngb0n3 2 ปีที่แล้ว +4

    Learned a BUNCH! Thank you so much!!! I do have an issue though; in the _ready() function of the Settings script, Godot is telling me the display_options_btn is a 'null instance'. I have it setup exactly like yours with the onready var but it throws it everytime

    • @rayuserp
      @rayuserp  2 ปีที่แล้ว +1

      were you able to resolve the issue? Do you still need help?

    • @F4ngb0n3
      @F4ngb0n3 2 ปีที่แล้ว

      @@rayuserp yes I was able to figure it all out. Can't remember what the exact issue was but found a work around and got it all sorted!

  • @yutsuneko
    @yutsuneko 2 ปีที่แล้ว +2

    Very instructive, thanks you!

  • @redteller
    @redteller ปีที่แล้ว

    so i tried added other indexes but didnt work and now im getting "Invalid get index 'fullscreen_on' (on base: 'Dictionary').
    ive checked to make sure everything is spelt and cased right. even went back on the video to make sure i did everything right. any suggestions?

  • @EthernalOynuyor
    @EthernalOynuyor ปีที่แล้ว

    Good video, one thing tho
    all of my settings get saved without problems but the sound sliders don't, they just reset after every launch?

  • @paulosullivan3472
    @paulosullivan3472 3 ปีที่แล้ว +1

    Can you make a video on how to make a menu where the key-bindings can be changed by the player?

    • @rayuserp
      @rayuserp  3 ปีที่แล้ว +2

      sorry for the late reply now to answer your question maybe in the future.

    • @paulosullivan3472
      @paulosullivan3472 3 ปีที่แล้ว

      @@rayuserp thanks!

  • @TheInfamousLegend27
    @TheInfamousLegend27 2 ปีที่แล้ว

    okay so i used this video for help a while ago and it's worked great...except for when i tried to re-add mouse sensitivity customisation. while it reads and saves any changes made without issue, even with the connected signals and custom methods on the player controller i can't get any value from the custom sensitivity i set. i've set it up like you have in this video and nothing, without a default variable for the sensitivity godot is saying the value is null. any suggestions?

    • @rayuserp
      @rayuserp  2 ปีที่แล้ว

      Do you have the code on GitHub so I can see it? Or is it possible for you to show me the code you are using to try and save the sensitivity

    • @TheInfamousLegend27
      @TheInfamousLegend27 2 ปีที่แล้ว

      @@rayuserp it keeps hiding my comments that i put the link on wtf

    • @rayuserp
      @rayuserp  2 ปีที่แล้ว

      hm thats weird

    • @TheInfamousLegend27
      @TheInfamousLegend27 2 ปีที่แล้ว

      @@rayuserp and again, what the hell man

    • @rayuserp
      @rayuserp  2 ปีที่แล้ว

      @@TheInfamousLegend27 honestly it is pretty weird because normally it would show me on my channel dashboard any comments held for review but it's not showing up

  • @betterteen
    @betterteen 2 ปีที่แล้ว

    how to make a reset button in settings to reset settings to default ?

  • @wagihhegazy2667
    @wagihhegazy2667 ปีที่แล้ว +2

    Here's the code for "save.gd" if anybody is too lazy to write it.
    extends Node
    const SAVEFILE = "user://SAVEFILE.save"
    var game_data = {}
    func _ready():
    load_data()

    func load_data():
    var file = File.new()
    if not file.file_exists(SAVEFILE):
    game_data = {
    "fullscreen_on": false,
    "vsync_on": false,
    "display_fps": false,
    "max_fps": 0,
    "bloom_on": false,
    "brighteness": 1,
    "master_vol": -10,
    "music_vol": -10,
    "sfx_vol": -10,
    "fov": 70,
    "mouse_sens": .1,
    }
    save_data()
    file.open(SAVEFILE, File.READ)
    game_data = file.get_var()
    file.close()

    func save_data():
    var file = File.new()
    file.open(SAVEFILE, File.WRITE)
    file.store_var(game_data)
    file.close()

  • @-Siddarth-
    @-Siddarth- 3 ปีที่แล้ว

    Awesome tutorial!

  • @direnbulut1318
    @direnbulut1318 2 ปีที่แล้ว

    How is the fullscreen comming faster then in your 2hour tutorial? thats pretty interesting :D

    • @TheInfamousLegend27
      @TheInfamousLegend27 2 ปีที่แล้ว

      cos it's a 33-minute cut of a 2 and 1/2 hour video lmao

  • @owenlloyd2528
    @owenlloyd2528 ปีที่แล้ว

    Thank you

  • @-Siddarth-
    @-Siddarth- 3 ปีที่แล้ว +1

    Hey rayuse! Can you make a video on how to make an NPC that just runs around? I have tried a lot of methods but all of them don't seem to work! Thank you!

    • @rayuserp
      @rayuserp  3 ปีที่แล้ว

      Hm maybe, that just has to do with pathfinding which I actually have a video on it already you would just have to modify it to work with points instead such as position2ds instead of following the player

  • @plutoniumgamestudio
    @plutoniumgamestudio 2 ปีที่แล้ว

    I cant download the githun projekt, it shows 404 error coulld you help me?

    • @rayuserp
      @rayuserp  2 ปีที่แล้ว

      Sorry about that the link was broken for some reason. It should be fixed now

    • @plutoniumgamestudio
      @plutoniumgamestudio 2 ปีที่แล้ว

      @@rayuserp Oh thanks, its working now!

  • @mr_sauce_cooks
    @mr_sauce_cooks 2 ปีที่แล้ว

    Im getting this error and can't get rid of it if anyone fixed it help me
    Invalid get index 'master_vol' (on base 'dictionary')

    • @rayuserp
      @rayuserp  2 ปีที่แล้ว

      did you check that you dictionary key is called master_vol exactly case being important as well

  • @LuizAntonio_Gameplay
    @LuizAntonio_Gameplay 2 ปีที่แล้ว

    could do custom input and joystick

  • @RyanScottForReal
    @RyanScottForReal 2 ปีที่แล้ว +1

    Would love to see that github

    • @rayuserp
      @rayuserp  2 ปีที่แล้ว +1

      The project is linked in the longer version but I will include it here thanks for reminding

    • @rayuserp
      @rayuserp  2 ปีที่แล้ว +1

      its now available in the description

  • @nectof
    @nectof 3 ปีที่แล้ว

    Thx!

  • @plutoniumgamestudio
    @plutoniumgamestudio 2 ปีที่แล้ว

    Hi! all its good, but i cant see you doing the "display fps". Btw amazing tutorial!

    • @rayuserp
      @rayuserp  2 ปีที่แล้ว +1

      There' s a longer version of this on the channel where I live streamed the entire process and show more of the settings

    • @plutoniumgamestudio
      @plutoniumgamestudio 2 ปีที่แล้ว

      @@rayuserp Okay

  • @madness2048
    @madness2048 3 ปีที่แล้ว

    Good, but how to show fps?

    • @rayuserp
      @rayuserp  3 ปีที่แล้ว +1

      i show all that in the longer version of this tutorial were I was actually live video should be on the channel

    • @madness2048
      @madness2048 3 ปีที่แล้ว

      @@rayuserp Thanks.

    • @TheInfamousLegend27
      @TheInfamousLegend27 2 ปีที่แล้ว +1

      you can achieve it in a single line of code by passing it through a label. the code is:
      label.text = "FPS: " + str(Performance.get_monitor(Performance.TIME_FPS))
      obviously i'm late to commenting but it's easier than watching through a 2hr video to get one tid bit of the settings menu lmao

    • @madness2048
      @madness2048 2 ปีที่แล้ว +1

      @@TheInfamousLegend27 thanks)

    • @TheInfamousLegend27
      @TheInfamousLegend27 2 ปีที่แล้ว

      @@madness2048 no worries :)

  • @alexanderouseph
    @alexanderouseph ปีที่แล้ว

    Bro's not gonna explain anything because of time limitations and ends up making a 33 min video. Irony

    • @rayuserp
      @rayuserp  ปีที่แล้ว

      30mins is definitely an overview compared to the 2+hr in-depth video.

  • @decryptedchaos
    @decryptedchaos 2 ปีที่แล้ว +2

    "I'm not going to explain in detail" var tutorial = "failed" "I'll put the code on github" var told_the_truth = false is.a.good.youtuber = false

    • @direnbulut1318
      @direnbulut1318 2 ปีที่แล้ว

      he made a in depth tutorial on this: th-cam.com/video/cQkEPej_gRU/w-d-xo.html