inkle / inkle/ink

Can't use Switch syntax on a Divert variable

Open
#878 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

Hello, i'm developing a nodal tool on Unity to create Ink Files and logic stuff. It's really great for helping to manage a very huge story on ink.
![image](https://github.com/inkle/ink/assets/92332204/c96d96cb-4aef-4c72-b5f1-6175c9e89908)
I have my switch node configurate to export like this
{ x:
- 0: zero
- 1: one
- 2: two
- else: lots
}

It's work like a charm, but when i change the variable type to a divert the syntax is not correct anymore :
{ Group:
- Wake_Up:
Wake Up
->END
- Knot:
Knot
->END
- else:
Unknow
->END
}
even with trying
{ Group:
- ->Wake_Up:
Wake Up
->END
- ->Knot:
Knot
->END
- else:
Unknow
->END
}
So the workaround i find is to use this syntax who work
{
- Group_1 == ->Stitch:
Hello
->END
- Group_1 == ->Knot:
Hello2
->END
- else:
->END
}
But that still ugly to create an exception in my code for this particular type of variable.
Is it possible to plan to have the switch syntax working with divert vars ?
Thanks a lot :)

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.