The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

I've seen pop-up type tutorials for how an app works, in various windows and android apps, that is only shown the first time an app runs. I mean the type of thing that frequently has a "don't show this again" check box option, but not always. What would it take to get such a thing working? Also, would something like this cause the app to require storage access that the app would otherwise not?

in Engine by (18 points)

2 Answers

+2 votes


I would save a value in a config file and check if that value has been set. You can use the Config file object to do this.
Here's some quick code that will do that. There's no error checking, but it does what it needs to do. The config file is saved (in Window) in C:\Users\USERNAME\AppData\Roaming\Godot\app_userdata\GODOT PROJECT NAME

extends Node2D

var only_show_once = false
var config_file = "user://settings.cfg"

func _ready():
    var directory =;
    if !directory.file_exists(config_file):
        print("Config file doesn't exist")

    if only_show_once:
        print("This isn't the first time this app has been run")
        print("First run. Add some code to show a popup box.")
        only_show_once = true

func load_config(filename):
    var config =
    only_show_once = config.get_value("config", "only_show_once")

func save_config(filename):
    var config =
    config.set_value("config", "only_show_once", only_show_once)

The above code creates a text file that looks like this:



You can edit that with a text file and set the value back to false to check it works as expected.
You can also save other config values to that file.

by (2,035 points)
0 votes

You should be able to use the user:// directory to save and load files.
For example, using ConfigFile:

# on startup
var config =
var err = config.load("user://settings.cfg")
if err == OK:
    var show_popup = config.get_value("startup", "show_popup", true)
    # show the popup if `show_popup` is true"user://settings.cfg")
    # couldn't load config file, show the popup

# when `don't show again` is pressed:
config.set_value("startup", "show_popup", false)
by (40 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.