Howdy, Stranger!

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

Can I order my conflicting links?

Hi! Sorry about the confusing wording of the question but I'm honestly struggling to find a better way of phrasing it. I'll try to be as plain as I can:

I'm trying to create a very simple one-click-advances-the-story Twine. So the user only has to click on the passage, anywhere, to advance. To this end, I have removed all link effects except for the cursor pointer. The link doesn't light up, isn't underlined etc. The whole of each passage is one big link to the next one.

However, what I'd really, really like to do is also to be able to use the <<insert>> macro within a passage, so that the first time the user clicks, new text is added/inserted, and then the second time the user clicks, the passage changes.

This obviously creates a conflict, because the clickable <<insert>> text is inside the link to the next page. I've tested what happens, and essentially, it just ignores the <<insert>> command altogether.

Is there any kind of extra script, commands etc I can do to make it so that the <<insert>> link is prioritised and the new text added in before anything else?

Comments

  • edited November 2015
    I'm a Twine noob, so may not be of any help, but the obvious question that springs to mind is does the insert macro have to be part of the passage link?

    I'm probably just confusing matters more, as I don't even know how, or even if, the 'insert' macro appears as a clickable link.

    I'm just wondering if it's possible to set it up so that the player clicks somewhere other than the passage to trigger the insert text action.
  • You need to state which story format you are using, as answers can be different for each one.
  • Hi! Sorry, I meant to say: I'm using Sugarcube.
  • Hey Jud - thanks for jumping in! The insert macro does give a clickable link - you click it to make extra content appear.

    I'm not sure how to make the clickable part anywhere else on the page/in the passage, but it would be problematic anyway - the way I'm trying to approach this project is to give the user as simple an experience as possible - essentially keep clicking anywhere to keep advancing the text.
  • Focksbot wrote: »
    Hi! Sorry, I meant to say: I'm using Sugarcube.
    SugarCube 1 or 2, or do you mean Sugarcane?
  • edited December 2015
    Does it matter if the page refreshes in order to insert the new text?

    Again, please bear in mind I'm only going off what little I've been able to pick up from the kind folk here, but when I want to change the text on a click, I use this (for a passage with the title Room one):
    <<if not $WhatEver>>\
    Body of text goes here
    <<click [[Continue->Room one]]>>
    <<set $WhatEver to true>>
    <</click>>
    <<else>>\
    Body of text with new content goes here
    <</if>>
    

    Now I know that this isn't going to work as you have your whole page set to a link, which will override the 'continue' link, but that's how I replace text on click.

    I strongly suspect this is of no help whatsoever, but hopefully one of the more knowledgeable chaps willbe along soon to answer for you.
  • gryeelf - Sugarcube 1.

    Jud - Thanks for the code! Unfortunately, it does leave me with the same problem, as you say - that the two links conflict and the whole-page one takes precedence. Also, if I do take the route of replacing the whole text in one go each time, then actually, I might as well have each section in a separate passage. The appeal of <<insert>> is that a new section fades in underneath the existing text, which means the reader's eye won't ping back to the top of the page.
  • If you're trying to use the Combined Replace Macro Set from Glorious Trainwrecks, it is not compatible with SugarCube (any version). You'll need to download SugarCube-compatible version of that set from SugarCube's website (under Downloads > Add-ons). Make sure to read the included README, because there are differences.
  • I am using the Combined Replace Macro Set, but I've found that although the Replace macro itself doesn't work, the Insert one works just fine. I can also get the Replace one to work by going into the script and renaming it - it seems to be that while it's called 'Replace' it conflicts with Sugarcube's own native Replace macro.

    Given that I can get the GT Insert and Replace to work fine on their own, there's no need to download the Sugarcube add-on, is there? Or is there a deeper conflict going on? Will it be easier to do what I'm trying to do with the Sugarcube add-on?
  • Focksbot wrote: »
    Given that I can get the GT Insert and Replace to work fine on their own, there's no need to download the Sugarcube add-on, is there?
    ... it is not compatible with SugarCube (any version). You'll need to download SugarCube-compatible version ...
    TheMadExile (the developer of SugarCube) has already answered this question for you, if you listen to his advise or not is up to you. *smile*
  • I'm not really sure that answers the original question of how I can order my links, but thanks.
  • I'm now using Sugarcube's <<replacelink>> macro set instead and adjusted so that all my <<insert>> links are <<insertlink>>.
  • He answered the question he quoted, which was do you really need to download the SugarCube-compatible version of the set. His answer, which was essentially "TheMadExile already answered that for you", is correct.

    To answer, again. Yes, you need to download the SugarCube-compatible version of the set. There are internal differences which required rewriting to function correctly. Using the set intended for the vanilla story formats will not work completely as intended.
  • Thanks, TheMadExile. I misunderstood greyelf. I'm now using Sugarcube's <<replacelink>> macro set instead and adjusted so that all my <<insert>> links are <<insertlink>>.

    Ah, you're the Sugarcube developer! No wonder you're so good at answering all the questions! :-)
Sign In or Register to comment.