Howdy, Stranger!

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

Previous hook macro behaviour query

edited January 2015 in Help! with 2.0
Okay, so since Twine 2.0.2 has been released, I went back to re-visit some old projects written in the 2.0 beta which had utilised the newly introduced hook macros. 

You used to be able to do something like (syntax might not be spot on as it wasn't as easy to remember as the newer syntax admittedly):

[Choice 1][1a]
[Choice 2][2b]

<<click ?1a ?2b>> Generic response<</click>>

However, when I try this in 2.0.2, with the revised syntax i.e.

[Choice 1]<a|
[Choice 2]<b|

(click: ?a ?b) [Generic Response]

when rendering in test I get 'Unexpected identified' and the text Generic Response appears.

I've also tried: 

(click: ?a, ?b) [Generic Response]//Works for clicking on the a hook, but not for clicking on b hook as it isn't turned into a link.

(click: ?a; ?b) [Generic Response] //Unexpected token error

Also, I'm certain in the beta you could also do something like this (using the old syntax though, for ease I've used the new syntax):

[Choice 1]<a|

(click: ?a) [Generic Response]

(click: ?a) [And then this appeared!]


So the way it behaved in the beta was that clicking the a hook would show both responses in the order they appeared in the passage (i.e. 'Generic response' would appear at the same time as 'And then this appeared!' when the link was clicked but in the specified order).  However, what happens now is that you have to click 'Choice 1' twice to see both lines of text, but they appear out of order i.e. 'And then this appeared!' renders first, and then 'Generic Response' appears. 

I guess what I'd like to know is - is there any way of achieving the old behaviours of the hook macro (i.e. generating one response to clicking on multiple links/allowing multiple responses to one click) but with the current syntax (which I much prefer!), or if not, is it something that is planned? 

Thanks.

 

Comments

  • bawpie wrote:


    (click: ?a, ?b) [Generic Response]
    I suppose I can bring this back... just have to make sure that making (click:) accept multiple arguments won't make things more complicated later, if I ever want to explain changer macros' relationship to normal ones.
    bawpie wrote:

    So the way it behaved in the beta was that clicking the a hook would show both responses in the order they appeared in the passage (i.e. 'Generic response' would appear at the same time as 'And then this appeared!' when the link was clicked but in the specified order).  However, what happens now is that you have to click 'Choice 1' twice to see both lines of text, but they appear out of order i.e. 'And then this appeared!' renders first, and then 'Generic Response' appears. 
    This is a bug that should have been fixed by now... but Chris didn't get that Harlowe fix into 2.0.2, it seems.
  • Ah, that's good to know on both counts.  Having the multiple arguments accept on click was super useful for what I was doing (particularly for constructing a nice branching conversation that had linear elements). 
Sign In or Register to comment.