How can I check if the scene has been reloaded once before?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Drawsi

Haven’t found much help online on that matter and of course I can’t check if the function is true. Is there a built in checker or should I make my own series of booleans?

:bust_in_silhouette: Reply From: Tato64

You could use a singleton/autoload (Google this, it’s very simple) containing something like var reloads = 0and in the line previous to your “reload_current_scene” you would do:
(Let’s assume the autoload is named “Autoload”)

Autoload.reloads += 1

You can then check in the scene…

if Autoloads.reloads == 1:
     do stuff

Works perfectly. Thank you so much!

Drawsi | 2021-11-22 13:45