Howdy, Stranger!

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

Links appear broken, but arent. What this mean?!

I'm making my first game, and I've started applying classes to links (I'm using Harlowe, btw). I don't how this is usually done, but I'm probably not doing it right because I'm getting some strange results. I've been doing it like this:

Before adding class:
Your cast itches.

After adding class:
<span class="hideClass">Your cast itches.</span>

When I do this Twine creates a new passage to link to. The line between the two passages that were origonaly linked disappears on the story map as if that link is missing or broken. What's weird is that when I actually play through the game the original link still works fine. Why is this happening? I'm worried that the links won't work when I actually publish the game.

Comments

  • This is because the code that handles that feature in Twine 2 only understands standard markup links, and by adding a HTML element (like span) inside the markup link it is no longer a standard one.

    You could place the span element outside the markup link:
    <span class="hideClass">[[Your cast itches.]]</span>
    
    ... although you would need to change your hideClass CSS selector to something like:
    .hideClass .enchantment-link, .hideClass tw-link {
    	// CSS goes here.
    }
    
  • Thanks! works like a charm! I can't get he hover styling to work now, though. How do I change the CSS so it will work again? This is what it looks like right now:

    .hideClass:hover, tw-hook:hover {
    text-shadow: 0 0 5px #FFF;
    }
  • Based on my example here, the CSS selectors would be something like:
    .hideClass .enchantment-link:hover, .hideClass tw-link:hover {
    	text-shadow: 0 0 5px #FFFFFF;
    }
    
  • Thank you!
Sign In or Register to comment.