Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Calling js functions in Twine 2 Sugarcube without macros, is it possible?

I've been attaching js functions to the global window object, and I'm able to call them:

-when setting a return type to a variable
<<set $var to myFunction()>>
-or when going to another passage
[[nextPassage][myFunction()]]

However, just calling my function, without a return value, is not possible.
<<myFunction()>>  //error!  must define myFunction() as a macro.

Is setting a macro the only way to call functions like this is Sugarcube? Thanks.

Comments

Sign In or Register to comment.