inkle / inkle/ink

Asynchronous function execution

Open
#898 1 comment 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 have a specific use case and wanted to ask about the suggested solution.

**Use case:**
At some point, I want to interrupt the story flow and wait until the player inputs something (e.g. clicks on a specific button).

**Current approach:**
Currently, I run an external function that sets a wait flag. While the wait flag is set, no more lines are read.

**Disadvantages:**
The disadvantages of this approach are that it requires unnecessary global variables to get some return value from code and that the story doesn't wait until the next line is read, meaning I can't use the "returned" value inside it.

In other languages, this would be solved using asynchronous functions. What's the best solution to this in Ink?

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.