User Tools

Site Tools


twine1:remember

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
twine1:remember [2016/05/09 23:37]
127.0.0.1 external edit
twine1:remember [2017/10/10 00:39] (current)
Line 1: Line 1:
-<- [[function|About Functions]] --------- [[if|Displaying Text Conditionally]]->+===== <<​remember>​=====
  
-===== <<​remember>>​ and <<​forget>>​ ===== 
- 
-====Motivating example==== 
 Variables are reset every time the reader restarts a story. If you'd like to remember the value of a variable after the game, use the [[<<​remember>>​]] macro. It works exactly the same way as [[<<​set>>​]],​ except it stores the variable in browser storage that remains between sessions. Variables are reset every time the reader restarts a story. If you'd like to remember the value of a variable after the game, use the [[<<​remember>>​]] macro. It works exactly the same way as [[<<​set>>​]],​ except it stores the variable in browser storage that remains between sessions.
  
Line 17: Line 14:
 <<​remember $meals>>​ <<​remember $meals>>​
 </​code>​ </​code>​
- 
-If you want to reset the remembered value, you can use the <<​forget>>​ macro: 
- 
-<​code>​ 
-<<​forget $meals>>​ 
-</​code>​ 
- 
-<- [[function|About Functions]] --------- [[if|Displaying Text Conditionally]]->​ 
twine1/remember.1462837049.txt.gz ยท Last modified: 2017/10/10 00:38 (external edit)