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

How to dynamically change transition speeds from passage to passage.

$
0
0
I'm really bad at CSS, selectors, and classes in general, and I can't seem to figure out how to change the passage transitions. I'm using Twine 2, Sugarcube 2.

What I'm trying to do is to make some passages tagged with "t8n-400ms" to ease in at 400ms (the default), and some other passages tagged with "t8n-1000ms" to ease in at 1000ms. How do I do that? Any help would be appreciated. I tried the code on glorious trainwrecks on tagged css, but I couldn't seem to get it to work... mainly because I don't understand it at all.



Suggestions for an Anti-Cheating Mechanism...

$
0
0
Greeting all!

I'm using Twine version 2.0.11 with Sugarcube version 1.0.34.

I built a math game that requires kids to correctly answer a certain amount of questions in a row order to "complete" the challenge. The game works perfectly fine, but there is one problem.

I think it's important that when kids miss a question, they should see what the correct answer was before they move on. While I've disabled the <<back>> button throughout the story, the kids can still use the browser's back button to go back a page, fix their answer and keep their "streak" alive.

Any suggestions on what I can do to fix that besides "don't show them their answer"?

Thanks in advance!

Making Table of Contents with Snowman

$
0
0
Hello, I am a new user to twine 2 and I'm trying to create a fixed sidebar that links to the other passages in the story using snowman. Currently I am prepending some html to a fixed ul but I am not sure how to make it link to the passages that they correspond to. Is there an easy solution to this? Thanks.

Nothing happens when locally publishing to file

$
0
0
I use Twine 2.1.0 on Windows 8.1

When I click the "Publish to File" option in Twine, nothing happens. No file is created (from what I can find), no dialogue box opens, nothing. Am I doing something wrong?

Publishing to file on v 2.1.0

$
0
0
I have been trying to publish one twine to file but every time I click the "publish to file" button, nothing happens. I've been able to publish past twines to file so I'm not sure what's going on with this one.

Harlowe Crafting System

$
0
0
So I've been looking around for a good crafting system for a game I want to create. My 'genius' idea is a painful one to code and I've tried some coding but it isn't working. What I want it simple, if you have enough parts i.e. wood and metal to create and axe, you can create it and it will be added to your inventory and if you don't, you cant craft it. The closet I have come to finding a proper craft system is on reddit and I will leave a link below if you want to check it out:

https://www.reddit.com/r/twinegames/comments/3kno75/crafting_system_in_harlowe_my_twine_2_guide/

Thanks in advanced

[SugarCube 2.11.x] Working with Tags and Passages to create a quest system

$
0
0
Hey there!

I was wondering if anyone knows a way to acquire the current room in which the player is residing.
The idea is that I'll be using
postdisplay
to go through an array of boolean variables that tell me if a given "mission" or "quest" has been accomplished and if not I'll do checks on my player, items and characters that are in the game.

Now, I was thinking about tracking the player (track the number of turns and which rooms have been visited), but that would make no sense since I got an inventory menu.

It would be nice if I could start events when the player enters a room that has been tagged with a specific tag.

I was thinking about building a list of the rooms that I have inside the game and then get their Passage object (using Story.get()) and ask for their tag property, but this seems probably too hard to maintain, since I need to extend, edit or shrink this list as I create my rooms and manage them.

Thank you for the help in advance!
I'll post some code, once I got a working prototype.
Any ideas?

Harlowe 2.0.0 Fade In Transition Help!

$
0
0
It's been a while, Twinerites!

I'm having a really odd and probably simple problem with the effect of text fading in on each passage. I read up on a past thread in the discussions that gave a CSS code to disable the fade in transition, but it appears to work when it wants.

Here's an example of some code I have:
<div class="animated fadeIn">{(set: $stories_completed to 5)}

=><=

<h1>[[Begin|Start]]</h1></div>

Seemingly at random, the code fades in only once how I want it and some other times it fades in twice (which is ugly and what I don't want). I've done this in a number of different ways, including and excluding the transition suppression CSS. Any help with this is appreciated.

TwineJS : How to Serve on local network?

$
0
0
Hi. I got this wonderful version or twine (Twinejs) working on a raspberry pi:

Now I would love to make the server listen not to localhost, but my machines IP on the network, so that it can serve other computers on the network. But I can't figure out if that is possible within Twinejs.

Is there a config file somewhere that I can tell to use e.g. 192.168.178.x:8080 instead of localhost:8080?
Or do I missunderstand the approach?

Creating an enclosing widget

$
0
0
In SugarCube, the <<if>> macro has a boolean parameter, as well as a closing tag, <</if>> or <<endif>>.

Can I, using <<widget>>, create something similar? I want to make a widget that can accept parameters, as well as having a closing tag.

Example:
<<showIf "showDesc" "Nature">>The tree is green.<<endShow>>
This will only show the "The tree is green." text if showDesc is true and settings.describe is "Nature".

control CSS-positioning via variable (SC 2)

$
0
0
Hey everybody!

[img][/img] For my colaborative writing project (I've bugged the forum with it on other occasions), I want to show the writers position within the arc of tension dynamically using the image I attached.

Here is what I'd like to accomplish:

1. There is a finishing date, when the all the stories are supposed to have been finished.
2. There is a determined amount of steps (e.g. weekly meetings) which divide the period from the start to the finish date.
3. Using the provided image, I'd like a pointer (basically a vertical line which moves horizontally) to show the position within the arc of suspense. This means that let's say after three weeks the pointer moved e.g. 30% from left to right.

My question concerns mainly the styling part of this problem. I guess I could just go and calculate the position of the pointer manually and toggle classes as time moves on, but I am sure there is a better solution which can calculate the "animation" of the pointer.

If and endiff error

$
0
0
so i'm trying this out for the first time, and i want it to be so that every time the player dies, jew god takes 25 schmeckles from the player. If the player can't afford it, instead of displaying "jew god gives you a second chance", i want it to say "You are short on schmeckles, jew god has denied your second chance. GAME OVER" The issue is, it tells me "else" and "endiff" aren't paired with if. Here is the page:

<<if $schmeckles is 0>>\
You are short on schmeckles, jew god has denied your second chance. GAME OVER
<<endif>>
<<else>>
Jew god accepts your offering [[try again|op]]
<<endif>>\

also i use SugarCube 1.0.35 for compatibility sake, if that has anything to do with it i'm willing to change a few things.

Printing Proofing Copy

$
0
0
Hello All,

I'm new to the Forum. Hi Everyone.

I've looked through Forum listings on how to print a proofing copy but have not found a solution that works yet.

Specs:

Twine 2.1, Sugarcube
Windows 10

Issue: Right clicking on opened Proofing Copy doesn't allow me to print or save the copy or even copy and paste. Would like to get the Passage headings and all text in the printed copy.


Any suggestions?

Thanks,
Sally

Harlowe 2 - hidden/show/enchant etc. not working?

$
0
0
Okay, so!

I recently downloaded Twine 2.1.0 after... very belatedly realising it'd had an update several eons ago, and I saw we can now use Harlowe 2.0.0! Only I seem to be unable to use the new features like (hidden:), (show:), (enchant:) and others? I've double, triple and quadruple checked that Harlowe 2 is the selected format, and it's even set as the default for all new stories, but all the above are highlighted in red when I type 'em in and I can't use any of them at all! It's no big deal since I can always switch back to Harlowe 1, but I'm wondering if I've missed something very obvious that would make them work for me, haha.

Twine 2.1.0 starts but won't accept commands, including Quit

$
0
0
I recently updated to Twine 2.1.0 on Windows 10 64-bit. When I start the program I get the menus but an otherwise blank window - no "Create new story" or anything else. When I try to use the menu commands nothing happens, including when I use them to try to quit. Same thing with shutting the program down via the X or Alt+F4 - nothing happens. The only way to shut it down is via the task manager.

At first I thought the problem was that I had installed it in a non-default library, but I get the same issue when using the default.

Able to use a variable as a span ID?

$
0
0
Sorry, pretty new to this, but my combined google-fu and experimentation has been failing me for about an hour now.

In sugarcube, is it possible to use a variable as a span ID, or to otherwise provide a dynamic way to generate span IDs on the fly? (I also tried workarounds with using both Print and Replace, but that failed for reasons I can't quite understand.)

For reference, I was trying to work on this: <<widget nestdialogue>><span id= "bob"><<click $args[0]>><<replace "#bob">><i>$args[0]</i><br>$args[1]<br>$args[2]<</replace>></span><</click>><</widget>>

and while it works, I'd like to have the text remain after each iteration. So, for me, a workaround is just as good as an answer to the title question. Thanks.

Trying to get background image on a passage

$
0
0
Twine 2.1.0, Harlowe 2.0

I want to use an image for the background for a single passage. I'm trying this:

(background: "example.jpg")?Page

But I get this error:

The (background:) command should be assigned to a variable or attached to a hook.►
?Page

Figured "?Page" was OK for the "background:" macro. The Harlowe documentation suggests this is possible.
"?Page selects the page element (to be precise, the <tw-story> element) and using it with the (background:) macro lets you change the background of the entire page."

Unless perhaps this doesn't work for images.

I tried (enchant:) using an image name,

(enchant: ?page, (background: "example.jpg"))

but it just fails silently; no error message. Now, I understand that a missing image fails (silently) but an "<img" tag works just fine with the same image.

Any help appreciated.

Trying to get background image on a passage

$
0
0
Twine 2.1.0, Harlowe 2.0

I want to use an image for the background for a single passage. I'm trying this:

(background: "example.jpg")?Page

But I get this error:

The (background:) command should be assigned to a variable or attached to a hook.►
?Page

Figured "?Page" was OK for the "background:" macro. The Harlowe documentation suggests this is possible.
"?Page selects the page element (to be precise, the <tw-story> element) and using it with the (background:) macro lets you change the background of the entire page."

Unless perhaps this doesn't work for images.

I tried (enchant:) using an image name,

(enchant: ?page, (background: "example.jpg"))

but it just fails silently; no error message. Now, I understand that a missing image fails (silently) but an "<img" tag works just fine with the same image.

Any help appreciated.

Help on Timers in Sugarcube? (Offline version)

$
0
0
So I'm INCREDIBLY new to sugarcube, and I've been poking about the tutorials like a mad woman for a little while now- the issue is I'm getting a whole string of pieces of code; But I haven't the slightest idea on how to string them together to get them to do what I want. And I'd very much appreciate any help on the matter.

Here's the concept I'd like to do. When a player selects a choice using THIS

<span id="message">
<<click "Click this to see a message!">>
<<replace "#message">><<print "A message!">><</replace>>
<</click>>
</span>

I would like the 'A message!' to use the transition pulse (that's the code (t8n: "pulse")[This text will pulse] ) and when the pulse animation has finished, transfer the player to another page.

Is this even possible?

Help with Shop Functionality

$
0
0
I was trying to be clever and store a shop's inventory as an array of objects and "auto build" the store in Harlowe 2:
(if: $store_inventory's length > 0)[(for: each _item, ...($store_inventory))[(print: _item's name): $(print:_item's price)(click:_item's name)[(print: _item)(set: $item_to_purchase to _item)(goto: "Purchasing")]]]

The point was to have a purchasing screen that displayed more details about the object, and on purchase, subtract the money from the player's inventory, subtract the item from the store_inventory and add it to the player's inventory. However...

You more experienced people will immediately see the problem with my approach - the temporary variable "_item" is long gone when resolution of the click begins.

Is there a way to make something like this work?
Viewing all 1844 articles
Browse latest View live