First things first: my deepest thanks to the whole forum and specially @greyelf and @TheMadExile who have helped me again and again. I've just ported 100% of my Harlowe game to Snowman, despite not knowing Javascript, and it works all right.
Now, one of those stupid questions related to not knowing Javascript.
Sometimes instead of using <%= %> to print a variable I use <% print() %>, if it's in the middle of another block of code (an if for example). However, I don't know how to create a link that prints something after the passage has been rendered. Something like this:
When I click this link, statements like variable=1 are executed, but print() does nothing. I have some fuzzy notion that this is because the passage has already finished rendering, but I have zero understanding of why and how to go forward. Any suggestion?
Thanks!
PS: porting the game to Snowman has been more than worth it. The Harlowe version literally killed my mobile browser, while the Snowman version feels like a snappy web app. Now I hope that I get to finally end writing the story and release it, and people can reuse my code if they like.
Now, one of those stupid questions related to not knowing Javascript.
Sometimes instead of using <%= %> to print a variable I use <% print() %>, if it's in the middle of another block of code (an if for example). However, I don't know how to create a link that prints something after the passage has been rendered. Something like this:
<a id="link">Link</a> <% $(function () { $('#link').click(function () { variable = 1; print(variable); }); }); %>
When I click this link, statements like variable=1 are executed, but print() does nothing. I have some fuzzy notion that this is because the passage has already finished rendering, but I have zero understanding of why and how to go forward. Any suggestion?
Thanks!
PS: porting the game to Snowman has been more than worth it. The Harlowe version literally killed my mobile browser, while the Snowman version feels like a snappy web app. Now I hope that I get to finally end writing the story and release it, and people can reuse my code if they like.