display action at the same page

32 views
Skip to first unread message

Patrick Simon

unread,
Sep 6, 2014, 1:35:15 PM9/6/14
to twee...@googlegroups.com
hi, i serching for a chance to display text at the same page after a action.

i mean:

You find a ring. Do you want to wear it?


Yes
No

 
Now i want to display text at the same page.

Yes = You put it on your finger
No = You put it in your backpack


 

How can i do that? I am using Sugarcube

Tory H

unread,
Sep 29, 2014, 1:35:24 PM9/29/14
to twee...@googlegroups.com
Hi Patrick! Thank you for being interested in Twine!

Hmmm. The way I would do this is with the Glorious Trainwrecks <<replace>> macro, 
which is available here: http://www.glorioustrainwrecks.com/node/5029

Install the given JavaScript AND the CSS, and you can do a lot of things with this set of macros--replace text depending on the number of times a passage has been visited, for instance, or reveal text based on something a user has clicked.

    You find a ring. Do you want to wear it?

    <<replace>>Yes<<becomes>>You put it on your finger.<<endreplace>>
    <<replace>>No<<becomes>>You put it in your backpack.<<endreplace>>

This isn't a complete solution, but it gives you an idea of what's possible.

Note that the Glorious Trainwrecks <<replace>> macro works with Sugarcane and Jonah story formats. With some tweaking, I'm sure they'd work with Sugarcube, too. I'm investigating how.

More information about adding CSS is here: http://twinery.org/wiki/frequently_asked_questions#how_do_i_install_some_new_css_code_a_new_stylesheet

Hope this helps, and happy Twining!
Reply all
Reply to author
Forward
0 new messages