inkle / inkle/ink

Unity currentChoices.Count giving wrong value?

Open
#837 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.9k
Forks
540
PR merge metrics
No merged PRs in 30d

Description

Hi, sorry if this isn't the right place to ask questions like this, but I don't really know where to get help for things like this...

I've got an existing system in Unity that lets me talk to NPCs with Ink and go through branching dialogue with them. It's been working fine so far, except today when I wanted to add in a button to loop back around to the knot with the initial options in it. Should be easy, right?

Well, for some reason, when I get to my new knot with 2 choices in it, currentChoices.Count is telling me that there are no choices, and is instead continuing as if I picked the second choice.

Some screenshots to try and show what's happening:
The Ink knot that's behaving weirdly:
![Ink knot that's behaving weirdly](https://user-images.githubusercontent.com/91899052/232561054-176b66a6-bd1d-45d4-b980-644f400b0232.png)
C# code that checks the amount of choices:
![C# code that checks the amount of choices](https://user-images.githubusercontent.com/91899052/232561225-6bab663a-c654-4c15-911f-395554d1cc03.png)
currentChoices.Count printing 0 despite being at the knot with 2 choices:
![currentChoices.Count printing 0](https://user-images.githubusercontent.com/91899052/232561443-4e44b227-fe8a-461d-8f43-cff24e552eda.png)

I really don't know what's going wrong here, since my Ink code is written like everything I've done previously, and everything worked until I added this knot today. Is this a bug? Or am I doing something wrong?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.