Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

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

$
0
0
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.

Viewing all articles
Browse latest Browse all 1844

Trending Articles