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

Story not saving in Harlowe

$
0
0
Hello! I'm having an issue where the save feature in twine 2 isn't working. I've lost all my work a couple times now, giving me a flashbacks to when I first started using twine 1. I've also noticed that Twine loads SUPER slow for me. I have about 28 stories and tend to use lots of macros. I thought I saw an issue about the slow loading time on BitBucket but now I can't find it, and I can't find anyone having problems with stories saving in Twine 2.

Anyone know why this could be happening? Anyone else have this problem?

Testing my game

$
0
0
Hey everyone, not sure if this has been asked before...

My game is getting really big... i mean big big... and since i came from another engine, i usually mess up with variables designation.

Is there any tool that can play the game doing random choices and stop at errors. That would really help me, as i am doing it manually but its very difficult to hit every possible outcome.

Thank you for your help.

Where does Beta 3 save the in-progress story files

$
0
0
I'm not sure that I really have to know this, but it would be good for backup purposes. I started a new story just to see where it published so I could drag old stories over etc. and I can't find the story in progress (after searching my computer) or even a story folder for twine_2.1.0b3 stories in progress. When I publish I can put the file wherever as usual. I feel like I must be missing something simple, but I can't figure it out. What am I missing?

Persistent header with SugarCube

$
0
0
Hi,

I would like to add persistent header und footer - like persistent toolbars on jQuery Mobile - on my game using newest SugarCube story format.
I know PageHeader and PageFooter passages to show a header and footer on every passage, but this will add this on the normal scrolling text. Now I would like to show header and footer persistent on top and bottom of the window. I have add a new class (@@.persistentHeader; ... @@) on PageHeader passage and add some css (position: fixed) to pin the content of PageHeader on top of the window. But this feels a little bit of "cumbersome". So I was wondering if there is a better solution.

Kind regards,
Purzelkater

Ending game on a timer?

$
0
0
This is a two-in-one question. Firstly, is there an official 'end game' script, or do I just send them to a dead-end passage which says 'You're dead' or whatever?

Secondly, I have a set-piece where the player is being shot at from a distance. I want to give them a little time to choose an option which will provide cover from the gunfire, but if they're too slow have them hit by a bullet.

Would the easiest way to do this just be with the <<timed>> macro, or is there a 'proper'/better way to do this kind of thing?

Sorting arrays not working as expected

$
0
0
<<if $ArraySort == "Name A-Z">>
<<set $Array to $Array.sort(function(a, b){if(a.Name < b.Name) return -1; if(a.Name > b.Name) return 1; return 0;})>>
<<elseif $ArraySort == "Name Z-A">>
<<set $Array to $Array.sort(function(a, b){if(a.Name > b.Name) return -1; if(a.Name < b.Name) return 1; return 0;})>>
<<elseif $ArraySort == "Age 1-2">>
<<set $Array to $Array.sort(function(a, b){return a.Age-b.Age})>>
<<elseif $ArraySort == "Age 2-1">>
<<set $Array to $Array.sort(function(a, b){return b.Age-a.Age})>>
<</if>>

This is an older project that wasn't fully tested before I mothballed it, that I am now trying to get up and running again.

This is an attempt to sort the objects inside the array, using a method I believe I lifted from another game. All four values for $ArraySort (and thus all four methods of sorting the array) produce the same error message; "Error: <<set>>: bad evaluation: undefined is not a function".

About three lines below that error message is evidence that the array in question does indeed contain objects that have a .Name and a .Age property.

The passage comments contain an alternative method:
<<if $ArraySort == "Name A-Z">>
<<script>>
$Array.sort(function (a, b) {
var
NameA = a.Name.toUpperCase(),
NameB = b.Name.toUpperCase();
if (NameA < NameB) {
return -1;
}
else if (NameA > NameB) {
return 1;
}
return 0;
});
<</script>>
<<elseif $ArraySort == "Name Z-A">>
<<script>>
$Array.sort(function (a, b) {
var
NameA = a.Name.toUpperCase(),
NameB = b.Name.toUpperCase();
if (NameA > NameB) {
return -1;
}
else if (NameA < NameB) {
return 1;
}
return 0;
});
<</script>>
<<elseif $ArraySort == "Age 1-2">>
<<script>>
$Array.sort(function (a, b) {
return a.Age - b.Age;
});
<</script>>
<<elseif $ArraySort == "Age 2-1">>
<<script>>
$Array.sort(function (a, b) {
return b.Age - a.Age;
});
<</script>>
<</if>>

This produces a different error; "<<script>>: bad evaluation: $Array is not defined".

Any idea how to take one or both of these early drafts and turn it into something that works?

In case it isn't obvious, the four 'sorting options' I'm using are alphabetically ascending/descending by the 'Name' property, and numerically ascending/descending by the 'Age' property.

I am using SugarCube 2.7.2 on Twine 2.0.11

Path for images and fonts

$
0
0
I have added a background image on css stylesheet. If I open the published html file it works, but not if I run the story on Twine itself. Where I have to store images (and font files) so I can test my story without to publish it before?

[ANSWERED] Game Over - Disable 'Backward' Option?

$
0
0
Sugarcube 2.11.0

How would I disable the 'backwards' button on my Game Over passage? And is it advisable?

[EDIT] I've no doubt this is an utter mess of a solution, but until someone can show me the 'correct' way, it will have to do.

When the player dies, everything but the Saves and Restart links are disabled, and here's how I did it.

Gave the Game Over passage the tag restart

Then in my CSS I added:
body.restart #menu-story, body.restart #ui-bar-toggle::before { display: none; visibility: hidden; }

Make '@keyframes fadein' rule specific to one selector?

$
0
0
Sugarcube2.11.0

In my game, instead of having the links set to a different colour, I'm using a tactic which makes them slowly fade from a low opacity to full opacity over a time period.

I also have an intro or splash screen in which the title logo fades in by utilizing the exact same rule.

The problem which has developed today is that I've decided I want the passage links to fade from 0.5 opacity to full, rather than 0 to full, but because I use just the one CSS rule for this, my splash intro is affected the same way.

The fade-in durations can be set uniquely on both the links and the splash screen because that rule is unique to each of the selectors, but the one causing the problem is this rule:
@keyframes fadein {from {opacity: 0.5;} to {opacity: 1;}}
Because this isn't assigned to a unique selector, I can't stop it controlling the opacity on my splash screen.

Is there any way I can have the splash screen opacity set at 0 to 1, and the links opacity set at 0.5 to 1 ?

Getting rid of the passage background

$
0
0
I'm using Twine 2 with SugarCube 1.0.34. I can place a background image to each of my passages, however every time i add some text it places the image inside of that too. I've used the 'inspect' to find the bit i need to alter (<section id="passage-space" class="passage space" data-passage="Space" style="visibility: visible;") but i just cannot seem to get rid of it when i write my css code for it. Any help from you peeps out there would be a great help. Thanks

How reliable are the timed macros?

$
0
0
I know that in another text adventure builder I use, the timers can be rather unpredictable for others when they play your game. I suspect this is down to a number of things - the weight of the game, the users' internet connection, etc.

Because my game employs the <<timed>> macro fairly often - often in situations where it's important the action is triggered after the specified time - I thought I'd just check if Twine is known to suffer similar issues.

They work correctly for me, but I suspect that's because my game is constantly cached.

Quick question about link highlighting

$
0
0
I created this game for Paramedic students - http://philome.la/PcpPractice/croup-protocol

The problem is that sometimes the "correct" answers are already highlighted when you start or restart the quiz.

Any way I can fix this?

Thanks for the help. I am a super noob on twine and this is my first foray.

How to change text colour?

$
0
0
hey! i am trying to change my text colour to white but every code i use don't work.... i can change the background but i want it black...... i have tried body { background-color:black;
color:white;} ive tryed p {color:white;} :( ive been trying all day.. i am quite new to coding and im using the defalt format...... what should i do?

If nesting headache! (Sugarcube 2.11.0)

$
0
0
Can't work out what I'm doing wrong here. As the player clicks each item in the Storage Hut they're taken to a passage which says '(item) taken)' then a timer returns them to the Storage Hut passage and the the descriptions should be different (depending on which item they took).

This is the code, which works perfectly until they return to the hut having taken both items, at which point I want a 'Hut is empty' message, but I get the whole list of alternatives printed at once!
<<if not $hasCans and not $hasShells>>
Clearly it's been used for storage and half a dozen [[cans of assorted food]] remain. On a lower shelf a small [[box of shells]] for a handgun are lieing in the dust.

The main [[entrance|housedoor]] to the house is a short dash across open ground.<</if>>

<<if $hasCans>>On a lower shelf a small [[box of shells]] for a handgun are lieing in the dust.
The main [[entrance|housedoor]] to the house is a short dash across open ground.<</if>>

<<if $hasShells>>Half a dozen [[cans of assorted food]] food sit on the shelves.
The main [[entrance|housedoor]] to the house is a short dash across open ground.<</if>>

<<if $hasCans and $hasShells>>The storage hut is empty.

The main [[entrance|housedoor]] to the house is a short dash across open ground.<</if>>

Online game saves storage?

$
0
0
When playing online, where are Twine's save files stored?

In other words, would the saves be lost if the user cleared their browser cache?

Seeking opinion on Sugarcube's 'Backwards' function

$
0
0
The gamebook I'm currently making features a number of links in a sidebar. As well as the essential 'Save' and 'Restart' ones, there's also two others; 'Backwards' and 'Forwards'. The 'Backwards' link, as most of you will be aware, essentially reverses time and is therefore rife for 'cheating'. The player makes a wrong decision, so they simply hit 'Backwards' and pick an alternative.

I can disable these two links with CSS, but wonder if it's a bad move. I see it as a way to discourage cheating, but others might say whether a player cheats at a game is entirely up to them. It's also worth considering that saving the game before possible crucial decisions would mean they could step back a turn just as easily, but at least this would require a little foresight on their part.

My argument is that game developers in the mainstream market go out of their way to eliminate cheating and exploits. Fair enough, it's in their interest to do so for marketing reasons, but the principle remains.

Thoughts?

Change wording of 'saves' (Sugarcube 2.11.0)

$
0
0
Is it possible to change the word 'Saves' to something a little clearer such as 'Save/Load' ?

Sidebar collapse < hover effect (Sugarcube 2.11.0)

$
0
0
I want to remove the background hover effect for the little < character that collapses the sidebar, but I don't know how to write the selector.

I've tried:
#ui-bar-toggle::before:hover {text-decoration: none;}
But it didn't work.

Browser 'Back' button (Sugarcube 2.11.0)

$
0
0
Can someone please clear up a little puzzle. When I test my game in the browser, the 'Back' button remains inactive throughout. When I discovered this I was delighted, and assumed it was part of Sugarcube's make-up to stop people casually pressing 'Back' when they made a bad or fatal choice in the game. But on testing several other games from Twine's main page - some of which clearly use a version of Sugarcube - they all have an active browser 'Back' button when playing, and as feared I can simply hit this to return to the previous passage.

Is the inactive browser navigation unique to Sugarcube 2, or am I missing something here?

My browser is Firefox and please note I'm referring to the browser's < > buttons, not Sugarcube's 'Backwards' / 'Forwards' links.

Removing empty space at top

$
0
0
I'm making a Twine game; the passage needs to fill the entire page because I need it to look like various websites. I expanded the height and width of the tw-story element to 100%, but there's a bar of empty space at the top. How do I get rid of it? (Also, is there a way to remove the fade transition between passages?)

Here's my stylesheet so far:
body {
	background: #FFF;
}

tw-sidebar {
	display: none;
}

tw-story {
	width: 100%;
	height: 100%;
}

tw-passage {
	font-family: Monospace;
}

div.menuBar {
	width: 100%;
	height: 40px;
	background: #AAAAAA;
}
Viewing all 1844 articles
Browse latest View live