Howdy, Stranger!

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

How I could apply the dissolve transitions to every hook at once?

edited August 2016 in Help! with 2.0
Strangely enough, Twine 2 harlowe default transition "dissolve" only works for new passages, but not for the transitios of new text inside a node, for example, hooks and the click macro.

I know I could apply any transition effect to any hook by hand, as this:
(click: ?sleep)[(transition: "dissolve")[Restful sleep at last. But you cannot help to [[dream about her]].]]

But I have a problem with that, I have a gazillion of hooks in my game, and some nested inside another. So that it is not an option.

There is a way to apply a transition to all hooks at once? Vía macros or CSS?

Thanks.

Comments

  • edited August 2016
    pretty sure you can't, but by the time my message came to you after 4 days, in that time you could have just maned up and copy pasted no matter how big your game it is, it would have probably take you an hour or 2 to paste it and you would have saved time for yourself
  • That is not helpful. A game has a lot more to it than copy and paste the same trick again and again more than 430 times. I have words to write, you know?
  • I always look for "optimal programming solutions". And what you offer is suboptimal.
  • edited September 2016
    I'm not sure what you mean by "hook". Harlowe has its own uniquely confusing naming conventions which don't match standard CSS used in web design.

    If you want to apply an incoming dissolve to a link you can add the relevant animation rule to the Harlow link classes:
    tw-link, .enchantment-link {
    -webkit-animation: fadeIn 2000ms 1 forwards;
    animation: fadeIn 2000ms 1 forwards;
    }
    
    @-webkit-keyframes fadeIn {
      0% {
    	opacity: 0;
      }
    
      100% {
    	opacity: 1;
      }
    }
    
    @keyframes fadeIn {
      0% {
    	opacity: 0;
      }
    
      100% {
    	opacity: 1;
      }
    }
    

    Applying dissolves to any element en-masse is really just a case of finding what the element is called document-wide and writing an animation rule for it. Generally the best way is to use Chrome's dev tools to inspect the game as you're playing it to find out what's going on where, then you write a css rule to match the desired element.


    However, that said - there are many situations where you might want to address things individually, so I wouldn't write that off as a valid technique. You do have to copy paste some things in a game.
  • Claretta wrote: »
    Applying dissolves to any element en-masse is really just a case of finding what the element is called document-wide and writing an animation rule for it. Generally the best way is to use Chrome's dev tools to inspect the game as you're playing it to find out what's going on where, then you write a css rule to match the desired element.

    Yeah, Furkle helped me with this, and we got the proper tag to apply the animation, however, it did not work in the end (problems with something of the harlowe's DOM that I don't understand), so I've opted for removing all the effects at once with this:
    /*Supress page-to-page transitions*/
    .transition-in[data-t8n^=dissolve] {
    	-webkit-animation:appear 0ms step-start;
    	animation:appear 0ms step-start
    }
    

    But I think the ideal solution is that in a future update of Harlowe the default transition applies to appearing hooks too.

    Thanks!
Sign In or Register to comment.