Howdy, Stranger!

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

sample story as a workbook?

Hello
I'm interested in seeing a 'workbook' story format. Workbook meaning that as the user navigates the story the user must submit information about theirself. At a story  end (there could be many) the user would see their (post-processed) output.

e.g. (very very basic example)

What is your name?
(text field)
user: John

How many toes do you have, John?
(text field)
user: 3

John, of 3 toes, tell us about yourself.
(text area)

END OF STORY
OUTPUT to screen.
John, you have 3 toes. You said (content of text area). This makes you an interesting person.

Does anyone have code handy/available that does what I describe above?

many thanks!

Comments

  • Depending on which story format you choose to build your story with you can either:

    1. Use Harlowe's (prompt:) macro:

    (put: (prompt: "What is your name?") into $name)
    user: $name
    2. Use SugarCube's <<textbox>> macro:

    What is your name? <<textbox "$name" "">>
    user: <<print $name>>
  • thanks greyelf

    I banged together a quick demo of a super simple example based on your code.
    http://pastebin.com/kLUQ0D0Q

    One of my goals is to take online worksheets and turn them into (home)worksheets that don't require students to be online to do them... a singular issue for many parts of the less connected world.

    Does Twine 2 support
    • textarea?
    • radio buttons?
    • check boxes?

    If yes, what is the code? If no, what are possible workarounds?

    Unfortunately this forum search does not have a reusable search URL
    http://twinery.org/forum/index.php?action=search2
    I did search.

    thank you
    Dennis
  • Twine 2 is just the application you used to edit your story's passages, javascript and CSS. It also generates your story's HTML file.

    It is the Story Formats that define the base macros available to you and the default layout/look of your story. Each story format has their own documentation: Harlowe and SugarCube

    [quote author=writer_ link=topic=2295.msg6795#msg6795 date=1422197786]
    • radio buttons?
    • check boxes?
    The SugarCube story format has the <<checkbox>> and <<radiobutton>> macros.

    If I remember correctly none of the Twine 1 or Twine 2 story formats have a built in TextArea macros but some people on these forums have tried building their own.

    There is one for Harlowe here.

Sign In or Register to comment.