Howdy, Stranger!

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

Default value with textinput or similar.

Does the TWINE <<textinput>> have a defaultValue parameter? If so how do you set it?
If not, is there an alternative method that does?

Comments

  • It depends on the Story Format your using.

    SugarCube has the textbox macro which accepts a default value. (see Interactive section)

    The inputtext macro in Sugarcane / Jonah / Responsive does not support a default value.

    The creator of SugarCube has created a version of his textbox macro that works in Sugarcane and it can be download from his website, look for the "<<textbox>> macro (<button> variant) [ZIP archive]" link in the Extras section near the bottom of the page.
  • greyelf wrote:

    The creator of SugarCube has created a version of his textbox macro that works in Sugarcane and it can be download from his website, look for the "<<textbox>> macro (<button> variant) [ZIP archive]" link in the Extras section near the bottom of the page.


    Actually, that's a button-toting variant of SugarCube's built-in &lt;&lt;textbox&gt;&gt; macro, which is meant to be used with SugarCube.  It will not work in Sugarcane at all.
  • Ah, thanks, you two.  :)

    I've been using the default SugarCane, but it looks like SugarCube has some features that I could really do with. I'll have to try it and see how well things go!
  • To get around this in Sugarcane i've used
    <<set $firstname to "Carly">>
    <<set $lastname to "Wight">>
    on a passage before i've asked for input. In theory I think you could get around the input fields 'appearing' to be on different passages by using display
    http://twinery.org/wiki/display
    This doesn't print your default variable in the box, though.


Sign In or Register to comment.