Need help please | fixed issue.

trying to work this out,

why does the code squiffy.story.go("[link]"); not work?

tried putting it in as a auto jump after second choose by using [@2]: (like the doc instructed: docs.textadventures.co.uk/squiffy/) however nothing shows up.

seen a post here that say to change it to window.story.go("[link]") but this still doesn't work.

the reason we need it is we have 3 sets of 3 choices (9 in total) however we only want the player to use 2 or 3 of them as there is an 'interruption' during the scene but no matter what we put no text shows up and the game 'softlocks' with no more links to press and cant continue, we tried the 'if' and that just made the thing confused and pushed out 'squiffy.story.go("");' as a text form.

seem everything else but this code works, joining 'if' with this code messes everything up.

so any help on how this works and how to add a 'if effect to it, this would really be helpful.

thank you XD

p.s dont try edit the 'squiffy.story.go("");' and leave .go at the start of the line or, you wont be able to even run the preview, found that out after trying to fix it XD


What is the name of your section? I suspect is isn't "[link]".

If it's a section (non-javascript links look like [[link]]), you should use:

    squiffy.story.go("link");

If it's a passage (non-javascript links look like [link]), you should use:

    squiffy.story.passage("link");

@mrangel

sorry for long wait, yeah, we know this, the [link] was just to note that it is a link itself.

this does not work... even gave it a test, changed .go to .passage but still nothing showed up, even added both tags for it to follow and still nothing...

while it works for you, can i also ask if your able to attach an 'if' effect to it thanks. (Edit: notice the two end links clash but it doesn't work even with them alone)

[test]
[test]:
squiffy.story.passage("test");

[test]:
[[test]]:

complete

Edit: due to the jump not working, found an alternative...

@set test = 0

Links:
[test 1]
[test 2]
[test 3]

[test 1]:

this test +1 point

@inc test 1
{if test=2:[[done]](done).}{else: }

[test 2]:

this test +1 point

@inc test 1
{if test=2:[[done]](done).}{else: }

[test 3]:

this test +1 point

@inc test 1
{if test=2:[[done]](done).}{else: }

[@last]:

Due to links not disappearing, this is back up.

[[Done]]

[[done]]:

got two points so progress

Sounds like you were looking for something like:

[[Start]]:

Here you can choose *two* of [A], [B], and [C].

[A]:
You chose A!

[B]:
You chose B!

[C]:
You chose C!

[@1]:
Now choose one more…

[@2]:
    squiffy.story.go("Done");

[[Done]]:
You've made 2 choices, so you're finished.

That works fine for me. If your code doesn't work, I would suggest checking for typos.
Reading your first post again, you mention a "soft lock", presumably meaning that the other links are disabled but the new section doesn't appear. If this is the case, you have spelled the name of the page wrong. For example, if the section you're going to starts with [[done]]: but you put squiffy.story.go("Done"), this will happen because Done and done aren't exactly the same set of characters. If you're copying and pasting a lot (or using a phone's emoji input method), you may also have ended up with a zero-width space between the letters or something; in which case the problem is often resolved by deleting the name and typing it again.


yeah seem to be the squiffy.story.go("Done") code not working for some reason.

Edit: it works, seems to be the 'tab' space before it, for some reason, sometimes it doesn't do what its meant to and found that tab space lights up the 'go' in the code though at times it does not so might be just my computer being weird.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums