Creating combination lock puzzle in Sugarcube

Twine Version: 2.2.1
Story Format: Sugarcube 2.21.0

Hi all!

I’ve been pouring over the old Twine forums and these ones in hopes to find a solution for my question, but I haven’t managed it yet.

I want to implement a combination lock system like this one:

The example is originally built in Harlowe. I’ve been trying to translate it into Sugarcube, but I’m just not proficient enough to get it to work. I would absolutely love any help with making this puzzle work for Sugarcube.

I also tried referencing this:

But no matter what I did it, when I played the passage it kept telling me this:

I’m totally lost on what to do.

Thanks in advance!!

The reason why the <<cycle>> macro isn’t working for you is because you’re still using SugarCube v2.21.0, and the <<cycle>> macro was introduced in SugarCube v2.29.0.

I’d recommend updating Twine in general (currently v2.3.9) and SugarCube specifically (currently v2.33.2).

If you still need any help after that, just let us know! :grinning:

Oh god :sweat_smile:that would do it. Oof, thank you so much!!

Okay so - quick question - I’m trying to add a fourth dial option, but every time I copy/paste another option, nothing at all shows up.

EDIT: Sorry, I’m not sure how to post code on here. I’m essentially just adding one more cycle that is ‘_dial4’. Here’s a screenshot.

EDIT AGAIN SORRY: Okay, seems like this is part of a bigger problem - with this new version of Twine, I click ‘play’ and it doesn’t play any passage at all, just shows up blank in Safari. If I go to Twine website and upload the html, it works, but is there a way to be able to play my game right away rather than have to export it/upload it every time?

Simply paste the code into your message, select it, and then click the “Preformatted text” button in the toolbar (the “</>” button).
 

The newer versions of the Twine editor launch the HTML in your default browser when you hit the “Play” or “Test” buttons.

It shouldn’t show up as blank though. You might want to make sure that the story format is set properly (look in the bottom menu in the Twine editor). That can get screwed up sometimes when you update story formats.

Hope that helps! :grinning: