diff --git a/ink-engine-runtime/StoryState.cs b/ink-engine-runtime/StoryState.cs index 4639a494..727a3cac 100755 --- a/ink-engine-runtime/StoryState.cs +++ b/ink-engine-runtime/StoryState.cs @@ -810,6 +810,10 @@ internal void StartExternalFunctionEvaluation (Container funcContainer, params o callStack = new CallStack (funcContainer); callStack.currentElement.type = PushPopType.Function; + // Change the callstack the variableState is looking at to be + // this temporary function evaluation one. We'll restore it afterwards + variablesState.callStack = callStack; + // By setting ourselves in external function evaluation mode, // we're saying it's okay to end the flow without a Done or End, // but with a ~ return instead.