Skip to content

Accessing internal variables in Dialogic 2 #1556

Closed Answered by Jowan-Spooner
Kozelek asked this question in Q&A
Discussion options

You must be logged in to vote

In dialogic 2 you can access variables via the Variable subsystem, shortened to VAR:

If your dialogic-setup looks like this:

You could write the following in code:

Dialogic.VAR.Player.Name = "Emily"
if Dialogic.VAR.Counter > 3:
    Dialogic.VAR.Player.Health += 20

This is also explained in more detail in the variables editor.


Alternatively you can now access external variables of Autoloads in conditions. So if you had for example a "Map" autoload with variables that indicate which places have been visited you could make the following conditions:

That would imply this kind of variable in your "Map" autoloads script:

var visited_places := ["Kitchen", "School", "Park"]

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Kozelek
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants