Howdy, Stranger!

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

Passage Loop

So my starting passage has simple text which ends with a story link.This link takes you to other passages that explain some stuff and then another link takes you back to the starting passage.When the player is there I want he/she to get confused and click the story link again, but this time taking her to a passage which will begin the actual game.I tried using the <<replace>> commands but couldn't make it work.

Comments

  • edited October 2016
    I am assuming you're using harlowe the answer is pretty simple it's ridiculous, for the first one write story for the second one write story->the name of the passage they will both display the link story but the first one will send them to story the second will send them to the passage that starts the actual game, I would recommend you read the harlowe manual since if you're having troubles with a simple problem like this you're gonna have a lot of problems
  • edited October 2016
    Khaloodxp wrote: »
    I am assuming you're using harlowe the answer is pretty simple it's ridiculous, for the first one write story for the second one write story->the name of the passage they will both display the link story but the first one will send them to story the second will send them to the passage that starts the actual game, I would recommend you read the harlowe manual since if you're having troubles with a simple problem like this you're gonna have a lot of problems

    No I'm using sugarcube 2 and I want specifically the last passage to bring you back to the start.I've already figured out your way of making an exact copy of the starting passsage but that's not what I want.Isn't there anyway to do it.I set a value called $start to 1 and then tried to have an <<if>> statement changing the link but couldn;t figure it out.I'm trying this as a more of an experiment.I want to see if it's possible if I have to use something similiar in the future.

  • edited October 2016
    You probably want a combination of the <<if>> macro and turns() function. For example:
    <<if turns() is 1>>[[story]]<<else>>[[story|really begin story]]<</if>>
    

    Alternatively, you could do it with the visited() function. For example:
    <<if visited() is 1>>[[story]]<<else>>[[story|really begin story]]<</if>>
    

    Though, in this case, I'd stick with turns() as it's more efficient.
  • You probably want a combination of the <<if>> macro and turns() function. For example:
    <<if turns() is 1>>[[story]]<<else>>[[story|really begin story]]<</if>>
    

    Alternatively, you could do it with the visited() function. For example:
    <<if visited() is 1>>[[story]]<<else>>[[story|really begin story]]<</if>>
    

    Though, in this case, I'd stick with turns() as it's more efficient.

    Thanks a lot.I never saw the function turns().I will use this a lot further in the game.Again, big thanks :)

Sign In or Register to comment.