Quantcast
Channel: Twine Forum
Viewing all articles
Browse latest Browse all 3830

Evaluating expressions within function arguments

$
0
0
So this is hopefully a really stupid and easy-to-answer question.

I am upgrading a twine game from 1.4 to 2 in Sugarcube.

Previously, I was able to use stuff like:
<<set $foo = 25 + Math.floor( $bar / 2 ) >>

But now I cannot put an expression like "$bar / 2" into a function call, apparently?

Can I surround the expression with some character or something that will allow it to be evaluated and then passed to the function?

Thanks much!

Viewing all articles
Browse latest Browse all 3830

Latest Images

Trending Articles



Latest Images