Howdy, Stranger!

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

How do i make text disappear after a couple seconds?

You can see what i want.. It says in the title... Please help i use harlowe 1.2.2

Comments

  • I don't know how to answer this question, but I think this might help:

    http://twine2.neocities.org/#macro_live

    Sorry if it doesn't. If it does, could you show the code for other people to use (like me :smile:).
  • @tyrok_wolfgaming: It depends on what you mean by disappear!

    1. Instantly after three seconds.

    As @Deadshot stated you can use a (live:) macro to delay an action, the action in this case could be using a (replace:) macro to clear the contents of a named hook.
    |text>[This text **will** disapear in three seconds.]
    This text **will not** disapear in three seconds.
    
    (live: 3s)[
    	(replace: ?text)[]
    	(stop:)
    ]
    
    note: You need to use a (stop:) macro so that the replacement only happens once.

    2. Fade out over a period of three seconds.

    The How do i Make text fade thread explains how to use CSS animation to fade out text.

    Point 2b in the linked example is setup to fade out over a period of 10 seconds (10s), you will need to changed the values of both the -webkit-animation-duration and animation-duration properties from 10s (ten seconds) to 3s (three seconds).
    tw-hook[name="fade-out"] {
    	-webkit-animation-name: fade-out;
    	-webkit-animation-duration: 3s;
    	-webkit-animation-fill-mode: both;
    	animation-name: fade-out;
    	animation-duration: 3s;
    	animation-fill-mode: both;
    }
    
Sign In or Register to comment.