8000 How to get only visible text from a choice? · Issue #954 · inkle/ink · GitHub
[go: up one dir, main page]

Skip to content

How to get only visible text from a choice? #954

Open

Description

@Azim-Palmer

Situation

  • As I'm injecting in external dialogue at runtime, I have to maintain my own story history

Complication
As the Choice object doesn't expose the raw choice text, I have no easy way of omitting this from my story history

Example
If I have

* [I'm ready] -> choosePet

then calling this.activeStory.currentChoices[0].text returns "I'm ready" and as far as I can tell there's no metadata / way to get the original string ( [I'm ready] )

Additionally, as I can't seem to be able to get tags added to choices I don't have a clean way of marking doing

Workaround
Prefix lines with "no-history" and parse that out, the drawback is I have to overwrite regular Choice object's text property to my Ink wrapper as that includes the prefix

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0