Howdy, Stranger!

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

Go To Link displays blank page

I am using SugarCube 2.18.0 and Twine 2.1.3.

Okay so I have a time system in place and I wanted the player to be forced to 'sleep' after a certain time and then the day would go to the next and the 'time' would reset.

There are 8 turns in a day but the 'turns' arent counted by systems' original turn counter, it's counted by a special tag so specific passages don't take up time but others take up a lot of time (like three turns). I have the time displayed in a header and it follows the time really nicely.

Until I get to after the 8th turn (which is when the player is to be sent to sleep).

As I have the code right now, the passages up the turn and then my PassageReady page figures out if it's past the 8th turn and it's supposed to goto send you to the Late] passage which links to [[Sleep passage.
<<if $turn > 8>><<goto [[Late]]>><</if>>

The problem is, every time I test it after turn 8, it just...stops. It sends me to a blank page with nothing.

The passage it's supposed to send you to looks like this:
It's late and you are tired. You decide to get some sleep.

[[Rest|Rest]]

But again, it's blank.

Should I just have the player return to the base and have an if statement say after turn 8 the only thing you can do is sleep?

Comments

  • I don't have time atm to debug your issue but I have a suggestion.

    Instead of using a <<goto>> macro during the processing of the next passage to be show, use the Config.navigation.override feature in the Configuration Object to conditionally override which passage will be shown next.
  • edited June 2017
    <<if $turn > 8 and passage() != "Late">><<goto [[Late]]>><</if>>
    

    Your code didn't check whether the player already was in the right passage and kept sending them there over and over. The code above fixes the problem.
    Alternatively, this might work better, since otherwise resting might also send you back to "Late":
    <<if $turn > 8>><<set $turn to 0>><<goto [[Late]]>><</if>>
    
  • Thank you so much! I hate having to ask silly questions like this >.<
Sign In or Register to comment.