You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this test script for experimenting with embedding the engine with a Unity project I am doing:
[It seems like the "insert code" formatting is choking on the script, but I assume you can see what I'm doing]
EXTERNAL multiply(x,y)
- Hello world!
* Hello back!
- - Yay!
* Derp Derp!
- - What?
- Well, Nice to hear from you! Fun fact: 2 x 2 = {multiply(2, 2)}
-> END
It works fine in-game. The Ink editor is angry about that multiply function though:
Ink.Runtime.StoryException: Missing function binding for external 'multiply', and no fallback ink function found.
I mean, of course it would complain. It's externally defined! But I was intrigued by defining a fallback ink function so I could keep getting syntax help from the editor--instead of it choking on that whenever I type anything. I didn't see that mentioned in the documentation, namely:
It should just be a matter of creating an ink function with the same name / declaration. So, if you have EXTERNAL multiply(x,y) at the top of your ink file, make sure you have something like:
== function multiply(x,y) ==
~ return 1 // placeholder result
I have this test script for experimenting with embedding the engine with a Unity project I am doing:
[It seems like the "insert code" formatting is choking on the script, but I assume you can see what I'm doing]
It works fine in-game. The Ink editor is angry about that multiply function though:
Ink.Runtime.StoryException: Missing function binding for external 'multiply', and no fallback ink function found.
I mean, of course it would complain. It's externally defined! But I was intrigued by defining a fallback ink function so I could keep getting syntax help from the editor--instead of it choking on that whenever I type anything. I didn't see that mentioned in the documentation, namely:
https://github.com/inkle/ink/blob/master/Documentation/RunningYourInk.md#exernal-functions
It implies this is a thing I can do, so I'd like to know how that's done.
The text was updated successfully, but these errors were encountered: