Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all 1844 articles
Browse latest View live

harlowe - keeping variables through savegames?

$
0
0
yo
so i've got a save/load game function in my game at the moment (works if you close the tab, lets you visit the main menu, etc)

(this is a footer on every page:)
[Save Game]<save| || [Load Saved Game]<restore|
(click: ?save)[*Saved!*(savegame: "A")] (click: ?restore)[*If you're seeing this, the game failed to load.*(loadgame: "A")]

but!
i also have some settings id like the players to be able to customise (e.g 'show lock-in options' shows the final chances to see options)
You (if: $showlockin is "yes")[have](else:)[do not have] lock-in options enabled.
[Show Lock-In Options]<showlockin|
(click: ?showlockin)[You will now see lock-in options with LO tags.
(set: $showlockin to "yes")][Hide Lock-In Options]<hidelockin|
(click: ?hidelockin)[You will no longer see lock-in options.
(set: $showlockin to "no")]

the only problem is...
if a player saves the game, then goes to the menu, and changes the options... restoring their save game will reset the options to whatever they were when the save was made. making a new save keeps the options, but stops them returning to their previous point (deleting the old save forever; they have to restart).
is there any way to make certain variables carry over between saves?

TL;DR can't keep flags through savegames, how fix

Twine2/Sugarcube2 - re-enable browser's back button?

$
0
0
I guess the title says it all. I made a very short and very simple game using Twine2/Sugarcube2. It would make more sense to me if users could just return to previous pages using the browser's back button. (There aren't any variables that I'm worried about getting messed up.)

Is this feasible? Maybe I'm crazy, but I think I had to alter the code to disable the back button in earlier versions prior to the current Sugarcube?

Thanks.

Any dynamic text effect macros for Sugarcube 2.x?

$
0
0
heya! i'm very new with twine, in fact, just started my first project today. it's actually going along very well!

i wanted to spice things up in my story to have certain words have dynamic action, like being blurred out or shaking ala some of Porpentine's works.

however, despite my googling, i haven't found any dynamic text effect macros for sugarcube 2 ... perhaps any of y'all can point me the way?

finished 250k word game in Harlowe. Save data doesnt persist. Options?

$
0
0
Recently we completed a TWINE game with over 250k words. There are hundreds of variables and 1000+ passages. Great right? Well, then I realized that Harlowe data doesn't persist. Now I'm searching for a save option similar to one in sugarcube. Then, I'm ready to embark on learning that format. Any advice Twine wizards? Thanks as usual for your help in this.

Sugarcube : sidebar folded

$
0
0
Hello
I want to launch my story with the sidebar closed, as it looks when the user clicks the adequate arrow-button. I'm working with Twine 2.0.11 and Sugarcube 2.12.1
I have tried to put
UI.stow();
in the StoryInit passage, but with no result. Do you have any idea ? Thanks in advance...

Remove the history in Ui-bar

$
0
0
Hello,
Can anyone suggest a way to either remove or disable the #ui-bar-history in CSS? Format Sugarcube 2.x.

Thank you!

[[Home|previous()]] going to a passage named previous?

$
0
0
Another Harlowe to Sugarcube question.

When I use the syntax of [[Home|previous()]] Twine creates a passage named previous(). All I want it to do is make the button Home go back to the previous passage.

Am I doing something incorrect?

Using Sugarcube latest version.

Changing the title (SugarCube 2/Twine 2)

$
0
0
As I am sure he will read this, TheMadExile, I wish to thank you, dearly, for all your hard work. You have built something that even a simpleton such as I can use (well I try). Also, GreyElf, thank you for always helping. I have been making many, MANY Twine projects. I have never been able to understand the variables... at least night yet, but someday. Anyway, I am making my 'The Anax' game. Problem is, I originally typed, 'Call of the Cursed One', which was to be the sub title. So, I tried making a passage called, StoryTitle, and placed 'The Anax'. I made one also called StorySubtitle, and put 'Call of the Cursed One'. However, in the story, it simply says, "Call of the Cursed One" and then the subtitle also redundantly repeats it. I know I seem foolish to you, but I am more of a writer and artist. We all have our strong points, no? Can one give me a hand with this, please and thank you.

Images and Music on Mobile

$
0
0
Hello. I'm absolutely new to this whole thing. I've looked at video tutorials and such and ended up with a working game, no programming knowledge needed at all.

My story/game works fine on desktop but whenever I load it on my mobile phone, the images and music I added don't play or show up. I'm using sugarcube 2, which made everything work on google chrome and such, but I have no idea why it won't work on my mobile device.

[Harlowe] How to delete automatically the choices already done by the player?

$
0
0
Hi

I would like to be able to (in a display): delete automatically the choices already done by the player, in order to omit repetitions.

How to do so?

I imagine that it is with (history) and (replace) but I don t really get it :-)

Thanks a lot!

Error for IF statements in Sugarcube

$
0
0
Sorry for all the questions today but I'm trying to move from harlowe to Sugarcube and I have so many questions. Okay. First:

In Harlowe I set a variable: $preference: "Blue" for instance.
{(if: $preference is "blue")[Awesome](if: $preference is "red")[Yup](if: $preference is "both")[sweet]}
!

Now. In Sugarcube I'm not sure that I can remove the whitespace(?) which is accomplished by the curly braces in Harlowe. If I can't, I will have to figure out another solution. As that would make the entire formatting in Sugarcube visually appalling. (How would I do such a thing?)

Next, the code I've written in sugarcube keeps kicking errors to me.

Error: cannot find a closing tag for macro <<if>>
<<if $preference is "men">>him
<<if $preference is "women">>her
<<if $preference is "both">>him<</if>

also tried
<<if $preference is "men">>him<</if>
<<if $preference is "women">>her<</if>
<<if $preference is "both">>him<</if>

Thanks for all your help. #sigh


How to remove the UI bar (sidebar) margin in Sugarcube?

$
0
0
I managed to remove the sidebar using two methods which were supposed to also eliminate the left margin, but the margin is still there.

Please help! This is driving me crazy.


I'm using Twine 2, Sugarcube.

These are the methods I tried:

CSS:

#ui-bar {
display: none;
}
#story {
margin-left:3.5em;
}

JavaScript:
$('#ui-bar').remove();
$(document.head).find('#style-ui-bar').remove();


ALTERNATIVELY, if this is impossible, can I have all the text in some sort of centered invisible text box? For example like in The Uncle Who Works at Nintendo, so that the text is in the center of the screen but justified to the left.


Thank you very much for your help.

Can I make a link that can be clicked multiple times?

$
0
0
Hi!

I would like to create a part in my story where the player has to click a link 5 times to be able to move to that passage. I am using Twine 2 and Sugarcube 2. I tried to search for this but no luck.

relocated passage changes position after short time, grid lock has no effect

$
0
0
Hello Twine peoples:D

As a mere beginner (and first time poster! Hi!) I have encountered what I suspect is an issue with my own computer(since if everyone had it the forums would be full of people asking for a fix), but if it is the cause and fix elude me. Extensive search of the forums yielded no answer.

I am in the process of writing an addon for another person's Twine story with the author's permission, using the latest version, and I wish to implement everything in accordance to their tastes. In the present case, I wish to match their particular, tasteful and neat arrangement for their passages.

But every time I tried to place a passage close to another, the passage I would have relocated jumps an unpredicable distance to a location nearby, usually but not always to the right, regardless of whether the 'snap to grid' option is enabled or not. And the jumps themselves seem to have little relation to the grid, anyway, which is to say, my grid lock does nothing. This is at times accompanied by a strange input lag I did not see elsewhere - when it is, Twine doesn't respond to any input for a duration of time, although the window itself can be dragged around, closed and minimized as normal.

What could be the cause of the above issues, and what can I do to address them?

Make entire clickable in Sugarcube

$
0
0
Hello,
I'm quickly falling in love with Sugarcube. My game looks 100x better already.

Here's a few more questions...

1. How do I make a <li> element (which has a list of radio buttons) clickable?
radiobutton {
	border: solid #000060 0.09em;
  white-space: 0.3em;
	padding: .45em 0.45em 0.45em 0.45em;  
	border-radius: 0 em;
  color:#ffffff;
	background-color:black;
	font-family: "Arial Black", "Gadget", sans-serif;
}


and
<ul>
<li><<radiobutton "$job" "1" checked>> 1</li>

<li><<radiobutton "$job" ""2"">> 2</li>

<li><<radiobutton "$job" "3">> 3</li>

</ul>

<<button "Choose my job" "Job Path">><</button>>

is my current code. I've tried a display: block but that didn't work. Any advice on this one?

How to include Harlowe variable in html

$
0
0
Hi All!

I'm trying to use a variable($val) inside html on a passage.
(set: $val to 10)
<progress value= $val max="100">70 %</progress>

But the value is not understood by HTML. What should be the proper syntax?

Add outside CSS to Sugarcube

$
0
0
I stumbled on https://daneden.github.io/animate.css/ CSS and his effects would be a HUGE help to making this gamebook more interesting to read. How would I integrate it into the story's CSS? I tried copy paste for a giant fail.

Format Data in Twine to on Mac OS X (Yosemite, 10.10.5)

$
0
0
It looks as if I have the same sort of problem this person did on Windows: https://twinery.org/forum/discussion/4875/cant-install-sugarcube-2-to-twine-2-help

SugarCube 2 was working. I'm not sure when it broke in Twine 2; I've been using Twine 1, and when I realized how to put SugarCube 2 on that, I did so and noticed there was an update. I went to install that on Twine 2 (while it was closed), and now I get "The story format “SugarCube 2 (local/offline)” could not be loaded ()."

I've tried to re-add the file, and I get "The story format at file:///Applications/_game_making/_game-making_applications/Twine/Twine_2/offline_formats/SugarCube-2/format.js could not be added ()."

And now that "The story format “SugarCube 2 (local/offline)” could not be loaded ()." appears in triplicate.

Where do I go to clear out that local formatting data? I suspect the problem is that I changed directories and now have conflicting data, but I'm not sure where to look to check. deleting preferences files and reloading a new copy of Twine 2 didn't help.

Thanks!

Changing the title (SugarCube 2/Twine 2)

$
0
0
As I am sure he will read this, TheMadExile, I wish to thank you, dearly, for all your hard work. You have built something that even a simpleton such as I can use (well I try). Also, GreyElf, thank you for always helping. I have been making many, MANY Twine projects. I have never been able to understand the variables... at least night yet, but someday. Anyway, I am making my 'The Anax' game. Problem is, I originally typed, 'Call of the Cursed One', which was to be the sub title. So, I tried making a passage called, StoryTitle, and placed 'The Anax'. I made one also called StorySubtitle, and put 'Call of the Cursed One'. However, in the story, it simply says, "Call of the Cursed One" and then the subtitle also redundantly repeats it. I know I seem foolish to you, but I am more of a writer and artist. We all have our strong points, no? Can one give me a hand with this, please and thank you.

Optional Timed Text (SugarCube 2/Twine 2)

$
0
0
Hi there!

Currently I'm setting up text to automatically read out on a timed delay. However, it occurs to me that waiting for text to pop up may be frustrating for faster readers, who may prefer to see the whole passage just pop up instantly.

I'm using the <<timed>> macro with the actual time as a variable which the player will be able to set to either 1s, 2s or 3s. However, there's no way to set it to 0 or an effective 0. I think the minimum is 40ms, but that causes a very unflattering visual effect of text appearing in a downwards swipe, not all of it to pop up at once. (Like it would if there was no <<timed>> macro stalling its appearance).

Currently I've got this in the CSS
.macro-timed-insert {
transition-duration: 1s;
}

This in my StoryInit
<if $textspeed is "">><<set $textSpeed to "3s">>

And I'm doing something like this:
First non-delayed sentence.
<<timed $textSpeed transition>>
Second sentence.
<<next>>
Third sentence.
<<next>>
Fourth Sentence

[[Next|Some Passage]]
<</timed>>

It looks pretty dramatic for certain passages, which is why I really want to find a way to have my cake and eat it too.

I considered wrapping the whole thing in an <<if>> statement and then having an <<else>> version with the same thing above, minus the timed effects, but a guy I learned code off once said "if you're starting to duplicate things, you're probably doing it wrong."

Tl;dr: I'm looking for a way in Sugarcube 2 that I can insert a timed macro to slowly read text, but with the option to remove its effects entirely so people who want to read all the text right away can do that.
Viewing all 1844 articles
Browse latest View live