Twine Version: Twine ver. 2.3.5
Story Format: Sugarcube 2.30.0
Hi,
I created an “Endings” link dialog box on the UIBar API by doing the following in the StoryMenu:
Summary
<<link "Endings">>
<< script >>
Dialog.setup("Endings");
Dialog.append(" ");
Dialog.wiki("<<if $ending_1 == true>>Ending Name Here<< else >>???<< /if >><br>");
Dialog.append(" ");
Dialog.wiki("<< if $ending_2 == true >>Ending Name Here<<else>>???<</if>><br>");
Dialog.open();
<< /script >>
<< /link >>
And setting this variable in StoryInit and the passage:
<< set $ending_1 to 'false'>>
<< set $ending_2 to 'false'>>
<<run memorize ('ending_1', true)>>
But it doesn’t appear to work. On the other hand, when I apply the basic conditional statement it does except whenever I refresh it, the variable reverts to “false” rather than retaining the ending name. Would someone please kindly point out what I’m doing wrong and explain the proper way to use memorize(key, value)
?
Thank you