How to use globals that are not flags

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Harm Reck
:warning: Old Version Published before Godot 3 was released.

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 and, but i feel like there should be an easier way to do this.

Any help, would be appreciated.

What are “esc-files”?

Zylann | 2017-01-15 21:28

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 - 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)

henriquelalves | 2017-01-17 18:42

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 set_globals 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 and the globals and stuff are handled by and i suppose i could just change those to do what i want.
I just thought there should be an easier way.

Harm Reck | 2017-01-17 20:39