Howdy, Stranger!

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

Can I make layer choices on Twine? (Ex: Alter Ego emotion + action)

Hey guys!

I wanted to know if it's possible to make a "Layer Choice" using Twine, so I can make the player choose a motivation along with the action without having to list all possible combinations.

It works like this:

( ) LIE ( ) TRUTH

( ) YES
( ) NO

or

( ) CALM ( ) ANGRY ( ) SCARED

( ) PUT HANDS IN THE HEAD
( ) TALK TO HIM
( ) LOOK AT HIM



Anyway, something like that. It's possible?

Comments

  • edited January 2016
    You need to state which Story Format you plan to use for your story when asking a question, as answers can be different for each one because it is the Story Format that controls the core features of a story not the Twine application/editor itself.

    The answer to your question is yes, you can do this in Harlowe and SugarCube using their built-in links and variables but how you do it depends on the Story Format.

    edit: And here a very basic example of one way to do it for Harlowe and SugarCube.

    Harlowe: You use a named hook and a (link:)/(set:)/(replace:) macro set.
    option A: |optA>[{
    (link: "LIE")[
    	(set: $optA to "LIE")
    	(replace: ?optA)[LIE]
    ] or (link: "TRUTH")[
    	(set: $optA to "TRUTH")
    	(replace: ?optA)[TRUTH]
    ]}]
    
    option B: |optB>[
    (link: "YES")[
    	(set: $optB to "YES")
    	(replace: ?optB)[YES]
    ]
    (link: "NO")[
    	(set: $optB to "NO")
    	(replace: ?optB)[NO]
    ]]
    
    SugarCube: You use an id'ed span and a <<click>>/<<set>>/<<replace>> macro set.
    option A: <span id="optA"><<click "LIE">>
    	<<set $optA to "LIE">>
    	<<replace "#optA">>LIE<</replace>>
    <</click>> or <<click "TRUTH">>
    	<<set $optA to "TRUTH">>
    	<<replace "#optA">>TRUTH<</replace>>
    <</click>></span>
    
    option A: <span id="optB">
    <<click "YES">>
    	<<set $optB to "YES">>
    	<<replace "#optB">>YES<</replace>>
    <</click>>
    <<click "NO">>
    	<<set $optB to "NO">>
    	<<replace "#optB">>NO<</replace>>
    <</click>></span>
    
Sign In or Register to comment.