Howdy, Stranger!

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

How to declare global javascript variables and how to transition variables between twine and html

Hi all, so, up until now I've been using twine variables to store globally declared variables, however, as my code's extension grows, I grow ever more tired of constantly typing state.variables.(...) and so i'd like to know if there is a way to declare javascript variables globally and how to go about it. I know I can just assign local variables to twine variables but if a more elegant solution, which insists on eluding me, is available I would prefer it hundredfold.

Continuing on the topic of transitioning between structures, I'd also like to know how to call twine variables within html code, I'm only starting to get into it and I think I can safely assume that if I can declare javascript variables globally I shouldn't need this bit, but additional knowledge does me no harm.

Thank you for your cooperation!
Sign In or Register to comment.