Let me start this off by saying that I have zero Javascript fluency, so I don't know how difficult/possible these would be to create. But I was thinking about...
1 a hover/mouseover macro that sends the player to a new passage when their cursor touches a certain word(s). think of it as halfway between the timedgoto macro and an actual clicked choice.
2 a hover/mouseover macro that sets a variable to true/false, according to whether their cursor touched the word or not, even though they didn't commit to a click.
I was thinking of a game sequence where the player has to follow instructions: 'don't touch that' / 'don't move' / 'go touch every capitalized word' etc. But that doesn't really work if I can't penalize or reward the player somehow... Lemme know what you think.
(for any future readers: preferred format is sugarcane)
Comments
The simple answer for the javascript side would be to create a <span> element (or <a> if you want it to look like a regular link) and set the "onmouseover" property of the element to a function. To go to a specific passage, you can use "state.display('title')", where title is the title of the new passage to go to. To set a variable, you can create a custom function to set it, like: I got the information about state.history[0].variables from this blog post about Twine variables. If you just set a regular javascript variable "varname" it won't be the same as the Twine variable "$varname". The same blog has a very helpful explanation of how to create a macro, but it does require in-depth javascript knowledge.
I actually read through that blog last night and despaired at my lack of javascript knowledge xD Playing with Twine has taught me some CSS, but I haven't breached the javascript fortress yet. Thanks again for your response. This'll help me do some neat things, I hope.
Tried all three verbal variations and ended up with the same error. May I ask how this macro differs from setting the onmouseover property to take the reader to a new passage?
Instead of using the state.display() function directly, I used the Wikifier.linkFunction() function, which adds a few conditions (which I confess, I don't completely understand, but I got it from the source code here) so it's closer to what a normal link would do. It also adds a callback function to disable the link once it's been moused over.