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

I'm having trouble setting up an inventory in Harlowe.

$
0
0
Hello all,

First off I'll admit that I'm very very new to working with Twine. I started yesterday to be exact.
I'm already enjoying it immensely but I've run into a snag.

The following tutorial explains exactly what it is that I'm trying to achieve.

http://gersande.com/blog/designing-inventories-in-twine-2-with-the-built-in-harlowe-macros/

My only problem is that when I use the SET macro, nothing appears in the inventory. I know I'm probably missing a step somewhere and I'll admit that I know nothing about coding at all, but I'm trying to learn.

I apologise for posting the whole tutorial here. I'd try to explain it but I'm afraid I'd just botch the whole thing.

All I end up with is "You're inventory is empty." and nothing else no matter what I do :/

Thank you in advance I really appreciate it.

How to keep multiple links updated?

$
0
0
Hello guys, I'm new. This is a bit of a tricky question but I hope I can explain myself well.

I have a passage with multiple links , which are meant to be questions that you ask a character. You can click all those links, meaning you can (and should) ask that character all those questions. For every link you click, the new passage shows the response (obviously) and the same questions again, except now the one link you just clicked can't be clicked anymore (since you've just asked that question obviously). So it's strike through. But the other links are there. Then you click the second link, new response with same links below except now you have two visibly deleted links which you can't click anymore, but the rest you can.

And so on until you're left with no clickable links (because you've asked all the questions already). This is what I plan to do, but I have no idea how to do this other than to do it in a lineal way but that's kind of being a masochist lol, I'd new so many passages and variables. Is there an easier way to accomplish this? Thanks in advance!

[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!

Responsive/dynamic layered images

$
0
0
I'm using Twine 2.0.11 and SugarCube 1.0.34.

I'm trying to layer images so they rest on top of each other to create a composite. What I would like is for the images to reside in the passage element, so when the story bar is open, the images slide to the right along with the rest of the text and when the story bar is closed, the images slide to the left with the text. Out of the box, only the text (or a single image) does that.

If I use position:absolute in the CSS, then the images layer properly in the top left corner of the window, right where I specify. However, they don't react with the rest of the passage text. They remain static regardless of whether the story bar is open or not. Position:fixed does the same thing.

If I create a new div with a relative position in the passage via HTML, then place the images with an absolute or fixed position inside the div, they're still pegged to the left. I tried both of these along with supporting CSS but neither worked:

<div class="relative"><div class="absolute">[img[picture1.png]]</div><div class="absolute">[img[picture2.png]]</div></div>

<div class="relative"><img class="absolute" src="picture1.png"/><img class="absolute" src="picture2.png"/></div>

I tried to create a new div via a JS append, but for some reason I could only get it to display text. Images didn't show up at all.

Does anyone have any suggestions on how to do this? I can't be the only one to run into this issue. And since Twine uses both HTML and CSS, there's got to be a way to do it.

Thanks,

Twinery.org Import From Url?

$
0
0
Is it possible to "Import From URL" at all?

It would be nice to put my .twine file online, and then provide a link that basically takes them to twinery.org, with my file open for them to edit.

Or alternatively, install a version of online twinery editor, and then let people edit it?

Getting the index of an element in an array?

$
0
0
Specifically, I'm trying to make a system for character stats, where a particular character's stats are stored in a datamap as strings, but can be incremented from an array. So for instance:
(set $player to (datamap:
  "dex", "clumsy",
  "str", "weak")
)

(set $dexArray to (a:
  "clumsy",
  "average",
  "nimble")
)

What I'd like to do is to be able to use $player's dex to get the string "clumsy", and then find that string's index in $dexArray so I can increment it by using
(set: $player's dex to $dexArray's (//index of clumsy// + 1)

I know I can get a similar result by using numbers in the datamap (e.g. "dex", 1,) and that does make it easier to increment, but it means that each time I want to print the description of that stat, I have to use
(print: $dexArray's ($player's dex))
instead of a simpler
(print: $player's dex)

I'm currently getting around this by using a passage I named updateVariables that I can (display:) whenever the variables change, which sets the whole
$dexArray's ($player's dex))
to a single variable $dexDesc, but it requires more prep than being able to grab the string directly from the datamap, and it means I have to call that passage any time a variable changes.

Error message when opening Twine game in Safari

$
0
0
I'm using Twine 2, SugarCube 2.

I just uploaded my Twine game to my site, and it works fine with Chrome, Mozilla and IE. But when I try to open it in Safari (on the phone), I get an error message ("security error dom exception 18"). The same happens with other Twine games as well.

I googled the error, and found out that it happens when cookies are disabled in Safari. Enabling cookies (at least partially) does solve this.

But is there a way to fix this via the game's code?

Is it a problem with all Twine games, or is it due to my HTML, CSS or JavaScript? What can I do about it?

Video with autoplay?

$
0
0
Hello everyone! :)
I'm creating a project using Twine 2 with Sugarcube 1.0.34, and there's a part where I want to play a local video (stored on the computer) with autoplay, so that when the passage loads the video will start playing automatically. Also, I DON'T want the video to have any kind of taskbar where you can pause, move forward, etc.
So, first I tried the most direct approach with this code:

<video src="videos/video1.mp4" width="640" height="480">
</video>

But it didn't have autoplay, naturally, so then I tried this:

<video controls autoplay>
<source src="videos/video1.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>

But this second version has a video taskbar with options like "play", etc.

So does anyone know how I could make the simpler version of the video (the first version, with no taskbar) start automatically when the passage loads, or how could I remove the options from the second video? I guess it must be pretty simple but I have no knowledge of HTML5 and I can't manage to figure it out... thanks a lot in advance! :)

Is it possible to hide or display a link only when the user is on a certain passage.

$
0
0
In my sidebar I have links to certain passages like "Inventory" and "Stats" and when the user clicks on them they have to then click the <<back>> button to get to where they were before. The problem is if they click inventory and then click stats then the back button won't go back to the game but instead to the previous passage which was the inventory.

To fix this I want to hide the links to other pages when the user opens one of the sidebar links. I think I could do this using variables but that would be really messy and I'd rather not do it that way. The sort of code I was thinking would work is something like:
<<if not passage == Stats>>[[Inventory]]<</if>>

I know this code doesn't work but I was thinking something similar to it might.

[Sugarcube] Can I do a statement to ask "if $variable is x or y"?

$
0
0
I'd like to hide a link if the user is on certain pages, Currently I'm doing this like so:
<<if passage() isnot "Inventory">><<if passage() isnot "Info">>[[Appearance]]<</if>><</if>>

So the "Appearance" passage link will only appear if the user is not on the "Info" or "Inventory" screen. It works but it is going to get really messy when I need to add 7 or 8 different links.

I was hoping there was a way to write it so that I could just add an "or" and the game would check if the user was on either passage.

(Harlowe - Twine 2) How do I style passage links to look like buttons?

$
0
0
Any kind of button will do. I'm just trying to clean up the look of my story.

Inventory System (Sugarcube 2.0 / Twine 2)

$
0
0
Hi all,

Right now, I've got a very makeshift inventory system going. Basically, I've created a variable for the player's weapon and armor ($player.weapon and $player.armor respectively), and I'm changing the value depending on what they've got in the slot.

However, it occurs to me that this isn't the most flexible approach I could be using, and doesn't leave a lot of growth room for different items or scenarios. E.g. Having multiple weapons in your inventory, dropping weapons, selling weapons, using one-use items, etc. Ideally, the inventory would be accessible from the side-menu - I already know how to create links in it and have already added a few.

I'm sure I could probably come up with some sort of system to do this. But I'm pretty sure given the prevalence of SugarCube games, I'd probably be reinventing the wheel.

In short, does anyone have any inventory system code that I could take and throw into my game? I've used Google to scour the site, but I haven't run across any inventory system code that seems explicitly safe to use for Sugarcube 2.0.

A link to an existing explanation is fine if I'm just doubling up on a common request, which I'm fairly sure I am. :)

Is there a way to increase the size of the "tags" field in Harlowe?

$
0
0
Hi all,

Using Harlowe on Twine 2.0 and I'm finding that I have a LOT of tags. The field is being over-run. Is there any way to make that field larger so I can see all my tags at once?

Here's what I mean by "overwhelming" the field:

2ntye7t.png

Thanks!

Music in Harlowe

$
0
0
Having a bit of trouble with Harlowe bg music...
I've been able to get it to play using this:
<audio src="https://a.tumblr.com/tumblr_mz1vl93Liz1shb4cyo1.mp3#_=_" autoplay>
However! I was wondering if there was a way to have it loop? Only on one passage, mind.

As well as this, if there was a way for a something to carry over to one passage without stopping, but stop on another passage? This I know is probably impossible on Harlowe, and if anyone had a solution for it I'd be really surprised.

Perhaps using some sort of true/false variable + while loop? It seems feasible with my knowledge but I'm honestly horrible at twine and have no idea on how to execute it. From what I've looked into, Harlowe has quite a few limitations, and this would probably be one of them.

If there is a way to do this in Sugarcube, I'm not interested, I've already gone too far into the project to make a switch.

When will audio come to Twine 2. WITHOUT Sugarcube?

$
0
0
Alright, so I'm making a game, and I want to put (SURPRISE) audio into it. Thing is, Sugarcube and I haven't exactly.. Agreed. (I may or may not have bashed a laptop's brain's in after two hours of arguing with that.. THING.) Does ANYONE have any idea how long it'll be until audio moves to twine 2? Have the developers mentioned it? I have an entire game written in the default style of twine 2.

I'd really appreciate it, really.

How to create glowing hyperlinks?

$
0
0
Similar to the ones in this game: https://kittyhorrorshow.itch.io/hornets

I've tried using online CSS guides. And I also opened Hornets in Twine 1 and copied the stylesheet over, trying with both the Harlowe and Sugarcube story formats in Twine 2, but no luck.

I'm using Harlowe, but could switch story format if I need to.

Apologies if this is a dumb question - I'm new to Twine.

Changing stylesheet for a single passage (Harlowe)

$
0
0
Is there a way to change the background for specific passages only?

How do I select which Harlowe format when multiple versions are installed?

$
0
0
Using Twine 2.0.11 locally on a Windows 10 system.

I wanted to update the default Harlowe from 1.2.2 to 1.2.3 and also add 2.0.0 to test and maybe convert my adventures.

I finally figured out how to download and add the formats to Twine (see instructions below) but here's were my confusion starts. Apparently the output html from Twine in the tw-storydata tag only have the name of the format not version, like this format="Harlowe". So after downloading and adding Harlowe 1.2.3 and 2.0.0 to Twine all three Harlowe formats are tagged as default formats.

When creating a new story it defaults to Harlowe, but I cannot see what version it is using. There is no tag in Harlowe to print out its internal version number. Also, I cannot find a Harlowe version number in a published html story. And I cannot find where Twine store its formats, but on a wild guess I think it stores it on %Appdata%\Local\Twine where it puts it into a local SQLlite database. Experimenting with tags, I think it still uses the first Harlowe format it can find which is the one that comes with installing Twine, Harlowe 1.2.2. Selecting to another format does not help since, whatever Harlow format you select, all three will be selected at the same time.

So, can I run Twine with multiple Harlow formats? If not how do I get rid of the default Harlow 1.2.2 since there is no delete trashcan icon associated with that format?

It would be much simpler if the tw-storydata tag also included formatversion attribute and that Twine also new about version number of formats to not confuse which format is used.

Side note on how to add new Harlowe formats to Twine
1) Go to the Harlowe development site on BitBucket
https://bitbucket.org/_L_/harlowe

2) Go to the do Download page (click on the cloud icon from the toolbar to the left)

3) To get the latest version (2.0.0 as when this was posted), click the "Download repository" link and save the ZIP file locally on your computer. To get another version (like 1.2.3), click the Branches tab and select the zip link from whatever version you would like to use.

4) Unzip the file you downloaded to somewhere on your computer. After unzipping make sure you can find the file format.js

5) Open Twine and click the Formats menu choice to the right. Select the Add a New Format tab.

6) Fill in your full local path to the format.js file (Example: C:\temp\harlowe\format.js) and click the +ADD button.


How to change CSS elements for mobile and tablet (touch screens) only

$
0
0
I'm using Twine 2, SugarCube 2.

My Twine game (A Fire Darkly: Chapter 1) is comfortably-playable both on PC and on mobile / tablet.

But there's one problem when you play on mobile or tablet. Sometimes the links randomly look like they're being "hovered" on, even though you can't hover on a touch screen. How can I alter the CSS to remove link hover effects only when the game is being played on mobile or tablet?

Twine 2 windows application story location

$
0
0
Hi.

Forgive me for my newbieness if the questions I am asking are inappropriate for this forum or if this has been discussed before.

So I just started using twine (with Harlowe currently) on a windows platform due to the fact that I don't always have internet access. I found a thread on this forum that I can't find again that states that the save location for stories is hard coded to the user's my documents folder on the C: drive - not even the registry linked one - the actual C drive :-(

So would it be possible for the developers to simply add some extra functionality to the OS specific versions to allow customizing the save location? Better still just allow the creation of 'standalone' version that saves to a sub directory in the current folder that can then be run off a portable drive. Such a feature would, IMHO, be extremely useful to many users. Having to manually export from machine 1, delete the old version on machine 2 and then import again is laborious, as is copying the story file directly over to a new folder on another machine. Having the whole thing portable would mean I could work on a game directly off a pen drive regardless of which computer I'm sat at.

In addition to this I also find the in-game 'save game' portability a bit limiting - yes it makes sense to save to the browser's own data but some people even have their browsers set to delete all content on exit. I haven't looked into how its doing this yet but I'm guessing its using cookies to store game data. I would like to implement a more 'permanent' save feature that would allow the user to 'download' a save game file generated from the game variables served up by the JavaScript, but before I reinvent the wheel has anybody already done this before?
Viewing all 1844 articles
Browse latest View live