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
However, just calling my function, without a return value, is not possible.
Is setting a macro the only way to call functions like this is Sugarcube? Thanks.
-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.