So, I've got a handle on most of the macros in the Harlowe documentation, except (hook:). "This macro, when attached to a hook, give it a specified name. It's equivalent to attaching a tag like |this> but you can programmatically determine the name this way (e.g. you can write (hook: $var))."
Can someone give me one or two real code examples? Tags, I totally get, but how you use (hook:) is not immediately apparent to me. Thanks.
Comments
Like, following your example I wrote this: I guess I see the "how", but I'm still not sure about the "why." Why wouldn't I just use a |saw> and |hammer> tag? Asking myself that question, the only answer I can come up with is that I can use the same variable over and over, but I'm not sure how that would really prove to be an advantageous thing.... Is it just a difference in preference or is there an application where (hook:) works better than separate nametags?
Thanks.
BTW, the variable-based hooks didn't work in the new Harlowe beta.
You may want to mention that on the Harlowe 1.1 thread (with an example)