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

can't move the boxes (passages) in the online version

$
0
0
I had to use the online version once I started Win 10. I cannot make the boxes move now and new passages show up under other passages that were already created but I can't reach them. Some give a small red 'x' under the box it has formed under. I've tried holding the space bar, it gives me a 'hand' icon but it still won't move the boxes around. Please help, thank you.

why do not work the links?

$
0
0
When i create a link, does not appear the new passage.
Can you help me? What i do wrong?
twinery-link.jpg

Error running Twine story on Chrome.

$
0
0
I am just starting out with this and was making a test story to figure things out. I already ran into a problem. Testing the story from the play button in Twine loads it just fine. But after I publish the story to an HTML file on my desktop and try to open it I just get a blank black window. I opened the developer console on chrome and it had this error: "Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document."

It loads just fine in Firefox and Explorer.

I'm having trouble with the Stylesheet

$
0
0
I've tried several different codes on color (the background, text and link) but none of them worked. I can't change the color. It stays the default black and white. I'm using harlowe 2.0.1
What to do?

Harlowe - fixed location for option links?

$
0
0
Sorry if this is a very basic question, but my noobish fiddling with css hasn't been very fruitful, and I was hoping someone might point me in the right direction.

Essentially, I present player options/choices as a set of separate links below the descriptive text, instead of inline within the text. I would like this set of links to remain in a constant location roughly at the lower right of the passage, anchored to the bottom of the passage, regardless of how much description text the passage contains. While I can sort of achieve that effect with a div container enclosing the option links in each passage, I would like to know how to do it globally, with the game stylesheet. I can create a separate pane with a header or footer tag, but I do not know how to make a particular passage's option-statements reside in it.

Appreciate any help that comes my way.

Twine 2 Harlowe 2.0.1 Validating Links

$
0
0
Hi everyone,
I am somewhat new to Twine, so I am looking for help on validating links.
The main problem I am having is I can't figure out how to to make a link that only works if a certain condition is met.
For example, if the player does not have enough money to purchase something, the link won't work.
Could someone explain this to me?
I know it involves "if" statements and macros, I just haven't been able to get this specific thing figured out.
I am using Harlowe 2.0.1 and I have Twine 2. If you have some advice, I'd be forever in your debt!

Auto-generating Links

$
0
0
Hi,

Absolute beginner with any of this and unable to find a solutions to the following problem.
I am working with Sugarcube 2 and have run into a bit of a hurdle I can't find a solution to. I have set up my links in a way to carry variables:
<<link [[Smell]]>>
    <<set $target = "flower">>
<</link>>

In the 'Smell'-Passage a switch statement is then checking on how to proceed with this particular input.

Since I have a lot of these kind of links, I was hoping I could automatically generate these links:
<<set $redflower to {
"name": "Red flower",
"actions": ["look", "smell", "take"],
}>>

<<set $blueflower to {
"name": "Blue flower",
"actions": ["look", "smell", "take"],
}>>

<<set $allflowers = [$redflower, $blueflower]>>

<<for _i to 0; _i lt $allflowers.length; _i++>>
    <<print $allflowers[_i]>>: 
    <<for _j to 0; _j lt $allflowers[_i].actions.length; _j++>>
        <<switch $allflowers[_i].actions[_j]>>

        <<case "look">>
        <<link [[Look]]>>
            <<set $target = $allflower[_i].name>>
        <</link>>

etc...

        <</switch>>
    <</for>>
<</for>>


This creates the basic link-structure just fine, but obviously <<link [[Look]]>><<set $target = $allflower[_i].name>><</link>> does not work ouside of the for-clause, so I get an error as soon as any of the links is clicked. Is there any way I can replace it to make this work, or do I have to fill in every link manually?

Sugarcube's UI.alert()

$
0
0
Hi, all!

Following a post by Emily Short in her blog, I am moving from Inform 7 to Twine. After a number of problems with Harlowe (my mistakes, not Harlowe's) I have switched to Sugarcube and everything is much, much better for me.
I use the UI.alert() function to display a messagebox and that works fine; but the messagebox window's title is a huuuge "ALERT!". How can I change that window's appearance (title, font, color)?

Thanks in advance.

P.S : I am very interested in Sharpe's TwineRPG-SCE-004. I can run it in my browser, but my Twine 2.1.3 won't import it :-(

Time Display

$
0
0
Hi, so I want to implement an in game time system (I'm using Harlowe).

Basically I want certain actions (hanging out with people/exploring/etc) to take up time and there are only so many hours in a day before you rest and at certain days certain things happen. Now, I know how to make the day counter go: When you 'rest' the day counter goes up. It's also displayed when you're in the bedroom.

My problem seems to be the time. I want it to be in the header on the far right corner.

In my startup page, I have
(set: $days to 0)
(set: $turn to 0)

(if: $turn >= 8)[
	(set: $day to $day + 1)
	(set: $turn to 0)
	(print: "It's getting late so you decide to go home and get some rest.") (goto:Home)]

On a seperate page labeled time I have
(if: $turn is 1) [(set: $time to "Dawn")]
(if: $turn is 2) [(set: $time to "Early Morning")]
(if: $turn is 3) [(set: $time to "Morning")]
(if: $turn is 4) [(set: $time to "Afternoon")]
(if: $turn is 5) [(set: $time to "Evening")]
(if: $turn is 6) [(set: $time to "Evening")]
(if: $turn is 7) [(set: $time to "Sunset")]
(if: $turn is 8) [(set: $time to "Midnight")]

Before you comment, yes, I know 5&6 are evening but that's when most of the characters are supposed to be off work.

My problem is, this doesn't work.

My header is supposed to constantly display a link to inv/relationships/stats/etc and then the 'time'. I tried this as
(if: (passage:)'s name is "inventory")[<!--Do nothing-->]
(else-if: (passage:)'s tags contains "donotshowinventory")[<!--Do nothing-->]
(else:)[ [[Inventory|inventory]] [[Relationships]] [[Stats]] [[Tablet]] 	(print: $time)

]

Does anyone know what I'm doing wrong or how I can do this better?

Autosave + Variables issue

$
0
0
Hi! I am using Harlowe 1.2.4, I was able to add an autosave feature by following @sgranade 's tutorial. My game has a small reward feature, the player is getting rewards at several passages, I used (set: reward1 to true) . He can view the rewards at another passage dedicated only for this, (if: reward1 is true)[Reward1] and so on.

When I start the game I have a menu, "New Game", "Continue" and "Rewards". The first two items are working. The third one does not display anything. I have to start a new game to unlock a reward and then to go to the Rewards passage, when the rewards are showing up (this is fine if it's my first play).

If I exit the game (after I started to play it), the Rewards passage (accessed from the home menu) does not display anything again when I am back. However if I first "Continue" the game and then I go back to the Rewards passage I can see the rewards that I unlocked in my previous session. So, the game is saving, but the rewards (the true variables) are showing up only after I start a new or load a game.

Another issue is when I open the game and I'd like to go with a different storyline (to unlock/get more rewards), so I go with "New Game", the rewards from the previous sessions are cleared, which is bad from this point of view. However if I first press "Continue" and then I go back and start a new game, my previous rewards are saved and I can get new ones.

Any solutions for my problems? Thanks so much in advance. I made and attached a quick demo that presents clearly my problem.

Messenger style of stylesheet?

$
0
0
Hey guys! i'm kinda new in this software and i would like to know if it possible to make a messenger style Twine game/app ?

This is what im thinking of http://imgur.com/a/zxGbE

Trouble shoot: Change colors?

$
0
0
Hi. I'm creating a review for a final exam... Currently I am using the 'click' function to reveal an answer. Is it possible to change the color so when it is revealed, it stands out from the question? Do I have to use the stylesheet or can I do it right in the passage?

Thank you!

Fade text upon entering passage.

$
0
0
Hey!

I could really use some help with this. When entering a passage, I want some text to slowly fade until gone, and stay hidden.

I know this is a simple task but I can't for the life of me find a simple solution to it. Everything I find is either triggered by hovering the mouse over the text, and/or the text returns. I'm on SugarCube 2.

I thought this in the stylesheet would work, but it just hides the text immediately from the start.
.fade {
opacity: 0;
transition: 5s all ease;
}

SugarCube 2.18.0 & Safari 10.1.1 (macOS 10.12.x) — "Fatal error" on opening HTML file in browser

$
0
0
I rarely ever launch my project in Safari directly so I'm not sure how far back I introduced this problem, but I have noticed on launching Twine's html output file in Safari itself I get the following error as a popup:
Apologies! A fatal error has occurred. Aborting.

Error: SecurityError (DOM Exception 18): The operation is insecure..

Stack Trace:
file:///Users/joshuameadows/Desktop/Alcyone-%20The%20Last%20City.html:6181:18178
file:///Users/joshuameadows/Desktop/Alcyone-%20The%20Last%20City.html:6181:18262
global code@file:///Users/joshuameadows/Desktop/Alcyone-%20The%20Last%20City.html:6186:30734

The game never progresses past the loading reticule. I'm not quite sure what I have done to cause the problem, although it works fine in the web2exe executable I use to package the project as its own app. It would make my life easier to debug if I can use the file occasionally in Safari, so I'm curious about fixing it if I can.

[Sugarcube] Tailored time system not functioning properly

$
0
0
Greetings,

Haven't been on in a while but for the most part I've been attempting to manage any problems I come across on my own, and it's been going reasonably well until this current juncture.

What I'm trying to do exactly is to convert a preset variable aka $Seconds, or something similar, into minutes. So 60 seconds would be equal to 1 minute 0 seconds, 90 seconds would be equivalent to 1 minute 30 seconds and 153 seconds would be converted to 2 minutes 33 seconds and so on, so forth. I'd prefer to do it in this manner rather than using javascript or anything else that I may have trouble integrating other systems with as essentially time will be the controlling factor in many game mechanic variables, from combat to disease incubation time to resting etc etc, so I would ideally want something that I can simply add + seconds or + minutes to any interaction and it will automatically translate onto the clock in the UI.

The following is an old draft of the code I had planned to use for this purpose.
<<nobr>><<silently>>

<<if $UITimeRestart neq true or $mm lt 0>>
<<set $mm to 0>>
<</if>>

<<if $UITimeRestart neq true or $hh lt 0>>
<<set $hh to 0>>
<</if>>

<<if $UITimeRestart neq true or $h0 lt 0>>
<<set $h0 to 0>>
<</if>>

<<if $UITimeRestart neq true or $m0 lt 0>>
<<set $m0 to 0>>
<</if>>

<<if $UITimeRestart neq true or $ss lt 0>>
<<set $s0 to 0>>
<</if>>

<<if $UITimeRestart neq true or $ss lt 0>>
<<set $ss to 0>>
<</if>>

<<if $mm gte 60>>
<<set $mm -=60>>
<<set $hh +=1>>
<</if>>
<<if $mm gte 120>>
<<set $mm -=120>>
<<set $hh +=2>>
<</if>>
<<if $mm gte 180>>
<<set $mm -=180>>
<<set $hh +=3>>
<</if>>
<<if $mm gte 240>>
<<set $mm -=240>>
<<set $hh +=4>>
<</if>>
<<if $mm gte 300>>
<<set $mm -=300>>
<<set $hh +=5>>
<</if>>
<<if $mm gte 360>>
<<set $mm -=360>>
<<set $hh +=6>>
<</if>>
<<if $mm gte 420>>
<<set $mm -=420>>
<<set $hh +=7>>
<</if>>
<<if $mm gte 480>>
<<set $mm -=480>>
<<set $hh +=8>>
<</if>>
<<if $mm gte 540>>
<<set $mm -=540>>
<<set $hh +=9>>
<</if>>
<<if $mm gte 600>>
<<set $mm -=600>>
<<set $hh +=10>>
<</if>>
<<if $mm gte 600>>
<<set $mm -=600>>
<<set $hh +=10>>
<</if>>
<<if $mm gte 600>>
<<set $mm -=600>>
<<set $hh +=10>>
<</if>>
<<if $mm gte 600>>
<<set $mm -=600>>
<<set $hh +=10>>
<</if>>
<<if $mm gte 600>>
<<set $mm -=600>>
<<set $hh +=10>>
<</if>>


<<if $hh gte 24>>
<<set $hh to 0>>
<<set $Day +=1>>
<</if>>

<<if $hh gte 10>>
<<set $h0 to "">>
<</if>>

<<if $hh lt 10>>
<<set $h0 to 0>>
<</if>>

<<if $mm gte 10>>
<<set $m0 to "">>
<</if>>

<<if $mm lt 10>>
<<set $m0 to 0>>
<</if>>

<<if $ss gte 60>>
<<set $ss -=60>>
<<set $mm +=1>>
<</if>>
<<if $ss gte 60>>
<<set $ss -=60>>
<<set $mm +=1>>
<</if>>
<<if $ss gte 60>>
<<set $ss -=60>>
<<set $mm +=1>>
<</if>>
<<if $ss gte 60>>
<<set $ss -=60>>
<<set $mm +=1>>
<</if>>
<<if $ss gte 60>>
<<set $ss -=60>>
<<set $mm +=1>>
<</if>>
<<if $ss gte 120>>
<<set $ss -=120>>
<<set $mm +=2>>
<</if>>
<<if $ss gte 180>>
<<set $ss -=180>>
<<set $mm +=3>>
<</if>>
<<if $ss gte 240>>
<<set $ss -=240>>
<<set $mm +=4>>
<</if>>
<<if $ss gte 300>>
<<set $ss -=300>>
<<set $mm +=5>>
<</if>>
<<if $ss gte 360>>
<<set $ss -=360>>
<<set $mm +=6>>
<</if>>
<<if $ss gte 420>>
<<set $ss -=420>>
<<set $mm +=7>>
<</if>>
<<if $ss gte 480>>
<<set $ss -=480>>
<<set $mm +=8>>
<</if>>
<<if $ss gte 540>>
<<set $ss -=540>>
<<set $mm +=9>>
<</if>>
<<if $ss gte 600>>
<<set $ss -=600>>
<<set $mm +=10>>
<</if>>
<<if $ss gte 600>>
<<set $ss -=600>>
<<set $mm +=10>>
<</if>>
<<if $ss gte 600>>
<<set $ss -=600>>
<<set $mm +=10>>
<</if>>
<<if $ss gte 600>>
<<set $ss -=600>>
<<set $mm +=10>>
<</if>>
<<if $ss gte 600>>
<<set $ss -=600>>
<<set $mm +=10>>
<</if>>

<<if $ss lt 10>>
<<set $s0 to 0>>
<</if>>

<<if $ss gte 10>>
<<set $s0 to "">>
<</if>>

\\\\\\\\REPEAT CODE AS NECESSARY TO ALLOW FOR NUMBERS OUTSIDE OF MAXIMUM PRESET BRACKETS\\\\\\\\\

<<if $UITimeRestart neq true or $mm lt 0>>
<<set $mm to 0>>
<</if>>

<<if $UITimeRestart neq true or $hh lt 0>>
<<set $hh to 0>>
<</if>>

<<if $UITimeRestart neq true or $h0 lt 0>>
<<set $h0 to 0>>
<</if>>

<<if $UITimeRestart neq true or $m0 lt 0>>
<<set $m0 to 0>>
<</if>>

<<if $UITimeRestart neq true or $ss lt 0>>
<<set $s0 to 0>>
<</if>>

<<if $UITimeRestart neq true or $ss lt 0>>
<<set $ss to 0>>
<</if>>
\
<<if $UITimeRestart neq true>>\
<<set $UITimeRestart to true>>\
<</if>>\

<<if $mm gte 60>>
<<set $mm -=60>>
<<set $hh +=1>>
<</if>>

<<if $mm lt 0>>
<<set $mm to 0>>
<</if>>

<<if $m0 lt 0>>
<<set $m0 to 0>>
<</if>>

<<if $hh lt 0>>
<<set $hh to 0>>
<</if>>

<<if $h0 lt 0>>
<<set $h0 to 0>>
<</if>>
<</silently>><</nobr>>

<b>$h0$hh:$m0$mm:</b>$s0$ss

<<click "Seconds Time">><<goto "Time Test">><<set $ss += random (120, 180)>><</click>>
\
<<set $UITimeRestart to true>>\

This is a draft of the time system I've been working on. I had to work around the fact that the <<repeat>> macro <b><i>still</b></i> would not function for me when:

A) I upgraded twine to the latest version
B) I tested the example provided by the sugarcube wiki with Twine 2 and using both Sugarcube 1x and Sugarcube 2x, whilst having to readapt the system to work with 2x

So I was forced to use a more long hand method, which is by no means effective AND to add insult to injury some values will not display properly, and I have no idea why. Today, I planned on restarting the whole system from the ground up because frankly this system is far too lengthy for something that sounds so ideologically simple on paper.

Today I've tried to circumnavigate the fact that the <<repeat>> macro does not seem to function properly with this instead:
<<set $minutes to 0>>
<<set $seconds to 0>>


<<set $seconds to 300>>

<<if $secondsover60 eq true>>
<<set $seconds -=60>>
<<set $minutes ++>>
<<set $secondsover60 to false>>
<<elseif $secondsover60 neq true>>
<<if $seconds gte 60>>
<<set $secondsover60 to true>>
<</if>><</if>>

<<if $seconds gte 60>>
<<set $secondsover60 to true>>
<</if>>



There are $seconds seconds and $minutes minutes.

Which also does not function properly.

Would appreciate any input/help on this matter.

Why I click the publish button, a new page full of coding turn up?

$
0
0
What's wrong? How can I save or publish it?

Adding a score counter on Harlowe 1.2.2

$
0
0
I'm creating a multiple choice quiz, and I'd like tell the player how they scored at the end. Ideally, I'l have different passages, depending on how the player does. So I guess the question is twofold:

1. How do I set the counter to count correct answers?
- I did find some javascript in another thread that was for Twine 1.0, but I can't get it to work in this one.

2. How do I send them to the appropriate final passage, based on their correct answers? Examples:

1-2 out of 8: "What are you even doing here?"
3-4 out of 8: "You need to do some homework."
5-6 out of 8: "Not bad, but not perfect either."
7 out of 8: "Well done!"
8 out of 8: "Aced it!"

I'm pretty new to Twine and to Javascript, so any help would be greatly appreciated.

Two quick questions about upgrading to Twine 2.1.3

$
0
0
I typically do a lot of my work on my current game project while I'm at work (I'm a security guard; LOTS of time with nothing else to do but stare out the window or draw). I've been taking a lot of the blank time between human contacts to write, create, and learn the programming languages a little at a time (mostly thanks to a bunch of you here).

Now, I cannot install anything on the desk computer at work - no admin privileges - but I CAN plug my portable drive in, and Twine 2.1.1 runs perfectly off the portable drive without being installed on the machine itself (i just have to move the project folder back and forth from drive to drive).

Two questions are:
1. Are there any bits of code I'll have to update in this cats-trophy of code that I call a project, if I upgrade now?
&
2. Will 2.1.3 also run off my portable drive without being installed on this machine?

How can I tell Twine to search a different directory for stories?

$
0
0
I know that by default Twine will check /Documents/Twine/Stories/ (on Windows) for stories. I want to put Twine onto a flash drive so that I can work on my story away from my own computer. Is there a way I can tell Twine to look in a directory on my flash drive, rather than looking at the other computer's Documents folder?

Right-to-Left Text Support

$
0
0
I am trying to write a story in Arabic, but I am having difficulty setting the text right-to-left. My current solution is to edit the resulting html file and include "dir="rtl"" in the html tag. Is there a way to have this effect from within Twine 2?
Viewing all 1844 articles
Browse latest View live