This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+1 vote

Hi,
Is there a way in esc-files to acces global variables, that are not flags? Like integers for example. I suppose i could make changes to global_vm.gd and esc_compile.gd, but i feel like there should be an easier way to do this.

Any help, would be appreciated.

in Engine by (13 points)
edited by

What are "esc-files"?

Not sure if I understood the question, but if you have a global .gd script, you can access all of its variables anywhere in the code (as in the singletone tutorial http://docs.godotengine.org/en/stable/tutorials/step_by_step/singletons_autoload.html) - you just need to create the variable you want as a local variable in your global script, and than access it via reference (get_node("/root/global").variable)

Ok i guess i should have been more explicit and not just tag the question.
This is about godots point&click framework escoria.
In it there are esc files which serve as scripts to control dialog-trees.
there is a function in it setglobals which allows you to set global flags, i.e. booleans.
There's also the '>'-command which allows you to branch based on those.
What i want to do is have globals, that contain integers and make my branches dependend on those.
The gd-script that parses the esc-files is esc
compile.gd and the globals and stuff are handled by global_vm.gd and i suppose i could just change those to do what i want.
I just thought there should be an easier way.

Please log in or register to answer this question.

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.