Skip to content

Get all story variables #93

@nebfield

Description

@nebfield

Firstly, thank you for making this addon!

I want to load game state into an ink story. If I know the name of the variable I want to store I can use:

story.StoreVariable("test_variable", true);

Sometimes I don't know the name of the variables in an ink script. Is there a method to get all variables in an ink story?

Then I could compare the name of these variables to my game state and update them as needed.

In InkStory.cs I see:

public void StoreVariable(string variableName, Variant value)
{
    runtimeStory.variablesState[variableName] = FromVariant(value);
}

But I don't think runtimeStory.variablesState is exposed anywhere.

Is there a simpler or better approach to getting and modifying story variables? Thank you 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions