Skip to content

Instantly share code, notes, and snippets.

@joningold
Created March 24, 2021 10:58
Show Gist options
  • Save joningold/45cca563ca4e0632387c0f3314ca06a9 to your computer and use it in GitHub Desktop.
Save joningold/45cca563ca4e0632387c0f3314ca06a9 to your computer and use it in GitHub Desktop.
EXTERNAL tunnelDepth()
=== function tunnelDepth()
// Tunnel Depth not supported in inky!
~ return 1
=== tunnelOut(-> thenGoTo)
{ tunnelDepth() > 1:
// Tunnelling out!
->-> tunnelOut(thenGoTo)
}
-> thenGoTo
/*
On the c# side, bind this external function:
story.BindExternalFunction("tunnelDepth", () =>
{
return story.state.callstackDepth;
});
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment