User Tools

Site Tools


checkbox

Differences

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

Link to this comparison view

Next revision
Previous revision
checkbox [2014/09/23 01:50]
ateyourlembas created
checkbox [2017/10/10 00:39] (current)
Line 26: Line 26:
 Thus if a reader chooses "​shoes"​ and "​shirt"​ and clicks the button "Go on," it's the same as telling Twine this: Thus if a reader chooses "​shoes"​ and "​shirt"​ and clicks the button "Go on," it's the same as telling Twine this:
  
-    <<set $choice = ["shirt", "shoes"​]>>​+    <<set $choice = ["shoes", "shirt"​]>>​
  
-You'll notice this looks a little different from the usual variable.+You'll notice this looks a little different from the usual variable. That's because the values chosen by the reader are stored in the order you provided them in a "​list."​ The way to get stuff back out of a list is by asking for it by its position. In this case: 
 + 
 +    $choice[0] is "​shoes"​ 
 +    $choice[1] is "​shirt"​ 
 + 
 +Note that the position starts at 0.
  
  
Line 49: Line 54:
  
  
-As of version 1.4.2, there is no option to mark a checkbox as selected before your reader makes their choice.+As of Twine version 1.4.2, there is no native ​option to mark a checkbox as selected before your reader makes their choice
 + 
 +But if you're using the SugarCube story format, there are additional checkbox options. You can find [[http://​www.motoslave.net/​sugarcube/​docs/#​macros-checkbox|SugarCube checkbox documentation here]].
  
 Hope this helps. If you have questions, please visit the [[http://​twinery.org/​forum/​index.php/​board,​2.0.html|Twinery forum]]. Hope this helps. If you have questions, please visit the [[http://​twinery.org/​forum/​index.php/​board,​2.0.html|Twinery forum]].
checkbox.1411437052.txt.gz · Last modified: 2017/10/10 00:37 (external edit)