Hello, I have a question regarding using a variable’s value to form the name of a variable in my ‘GlobalResources’ autoload script. I am making these audit paper collectables, and I just want to know how I can have the ‘id’ of each collectable match up to an id variable in the autoload script. This will allow my game to keep track of what audit papers have been collected. I don’t know how to get my ‘id’ variole to finish the name of the variable in the autoload script.
This is unfortunately close to impossible with GDScript.
Instead, you can use an Array or a Dictionary variable in your GlobalResources autoload to store and read the status of your papers.
Or you can create a custom Resource called AuditPaper that you can then reference in an Array of you GlobalResources.
Great! Make sure to mark my response as a solution so that others know the issue is resolved in case they ever encounter a similar issue.
And if you don’t mind, maybe you could share what you decided to use in your code