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

Twine engine on my own server?

$
0
0
Am very new to this program and I like it a lot.
We do co-op work for large projects and I think Twine may be right for this.

Question:
To have the story always synced, be able to work on desktops and tablets and not having to send files back and forth can I place Twine engine and the files on our own server?


How to Add Variables in Sugarcube

$
0
0
I am doing a small betting game where you have a balance. I made it so if you win, it would <<set $balance to $balance += $moneybet>> (I also did this as + instead of +=)
When I do this, it does not add the variables together, it adds them onto each other. (ex. If my balance was 10 and the money I bet was 5, instead of adding them to 15 it would make them 105)
Is there another macro, or am I doing the expressions wrong?
Please let me know.

How to enable Submit button only if user has provided input in Sugarcube 2

$
0
0
Hi,
I am using Sugarcube 2.0.

I want user to:
1. Select an option from multiple radiobuttons (without automatically checking any radiobutton by default)
2. Enter text in a textarea (this can be optional or mandatory based on game setting)

I would like to enable the SUBMIT button only if they have selected one radiobutton, and entered text in textarea (if is mandatory as per setting).

How do I do this?

Thanks in advance

How do I print a variable that changes based on what happens later on in the passage? (Sugarcube)

$
0
0
Confusing question, I know. I was having difficulty phrasing it myself. The example below demonstrates my question clearer:

Example:
//This printed variable is at the top of the passage//
<<print $enemy_HP>>

//Then later on in the lower parts of the passage, there are <<if>> statements. e.g.://
<<set $random_event to random(1,10)>>
<<if $random_event is > 5>><<set $enemy_HP to $enemy_HP - 10>><</if>>

I guess what I'm trying to say is, in my story, a lot of random events may happen during the passage, but they wont dynamically update the "$enemy_HP" variable because the printed value is at the TOP of the passage. I want the $enemy_HP variable to display a value AFTER the rest of the passage has been rendered, but still remain at the top for aesthetic purposes. And I don't want to rerender the passage because that would execute all the $random_events again. Is that possible?

Like, I have player_HP values in the StoryCaption UI sidebar, and those values display POST rendering of a passage. I want that to happen with my enemy_HP values as well.

Hope my question was clear.

Fading/changing either background or text color over a timed period. NOT a transition.

$
0
0
Ok, so what I'm looking to do here is have the passage background (or text, either will work) color slowly fade to black as a 10 second timer counts down and have it reset to its original color when the player comes back to the passage. (It's looped; the player has to click a button to reset the passage before the 10 seconds is up or it's game over.)

Possible? Ideas?

Thanks for taking the time to read/answer!

Simple clock system

$
0
0
Hi everyone,

Im trying to create a very simple clock system in sugarcube 2.0 which just shows the amount of days that have passed since the story started and the current time.
Although I'm aware of the fact that there's numerous clock systems already around, most of those are a lot more complex than what I need. With my extremely limited javascript knowledge I havn't managed to modify those yet to work how I want it to.

Furthermore I want to be able to set certain events to increase the time or days by x hours or days. For example working on the farm should increase the time by 8 hours.

Is anyone able to help with this?

The format I want simply is:
Day: Day x, Time: 0:00 to 24:00.

Ofcourse I would like the day to change to day + 1 once 24 has been hit.

Thanks a lot in advance

How do I Make a 50/50 chance of with passage an action will direct you to?

$
0
0
I am making a part of my story where you have to jump over a pressure plate. You have a 50/50 chance of making it. If you die you go to one passage, If you make it you go to another. How do I do this?

Help with Pre tags and Poetry formatting in Twine 2.0

$
0
0
Hi guys! I'm trying to format some poetry for a Twine 2.0 project I'm working on.

I've got this in my style sheet:
.verse pre {
display: table;
margin: 0 auto;
}

which I got from this site.

The full code for the poem (again, from that site) is this:
<blockquote class="verse"
style="outline: 1px dotted silver;">
<h4>the sky was</h4>
<pre style="background-color: #fffff;">
the
sky
was
can dy lu
minous
edible
spry
pinks shy
lemons
greens coo l choc
olate
s.

un der,
a lo
co
mo
tive s pout
ing
vi
o
lets
</pre>
</blockquote>

which appears to become double spaced when the Twine game is exported and viewed in an actual browser. I've had issues with posting poetry in code in the past, but can usually figure it out (i know a bit of html/css).

I guess my question is, what's the best way to format this to force the lines to be right on top of each other. I've also tried using manually forcing the line space, but couldn't get it to work within the pre tags.

HTML and Harlowe

$
0
0
Hello Twine Forum! For my project at a summer camp, I am going to be using Twine 2 and making an RPG. I am sticking with Harlowe for this project. I have the mechanics and game done and I wanted to clean it up and there were a bunch of issues with HTML. The biggest ones were that there was this annoying gap between the header and nav section of my page and the [[Links to other pages]] did not work when clicked. How do I fix these issues?

How to make a passage loop in Twine 2 (Harlowe)?

$
0
0
I just begun learning codes and Twine 2 by myself, I've somewhat ran into a wall as I want to make my passage loop when player chooses a certain option but unable to do so :(.

For example:
I would like to ask player if they want to open a door, if they choose "Yes" then player will move on to the next passage, but if they choose "No", they will continuously be asked if they want to open the door until they choose yes.

The way I've been trying to do, is if player chooses no, they will be looped back to the "Take a deep breath" passage until they choose yes.
But the result per the attached pic, is Twine 2 just creates another new passage with the same title.....but I cannot figure out what doing wrong.

Really appreciate every help I could get :), thanks guys!

(goto:) and (link-goto:) not work with Harlowe 1.2.2

$
0
0
Hi, I'm new with this tool. Recently got a problem with GOTO in Harlowe.
I expected to have readers redirected to another passage with a given string as valid passage title. However, I always encountered the error 'I can't (go-to:) the passage 'A' because it doesn't exist.' Oh guys, I was really sure the target passage title did exist in the same story.

easy code as below:
(link-goto: "go", "A")
(go-to: "A")

Twine 2.0.11. Tried both web and client, neither can work.
But curious it works with this pattern
[[blabla-> A]]

Anything I was missing? Any suggestions here?

Calculated Object Properties not updated when other properties of object updated

$
0
0
Twine 2.0.11, Sugarcube 2

Hi, new here, have been using Twine 2.0 desktop version for almost a month now.
Recently came across a tutorial for object oriented programming for Twine and followed a couple more online resources to update my Twine code.

I am having a problem with "non-updating" properties. Consider the following code in my "StoryInit" passage:
<<set $crystal to {
	red: 0,
	yellow: 0,
	white: 0,
	black: 0,
	green: 0,
	get total(){return this.red +this.yellow +this.white +this.black +this.green;},
}>>

And then I do some changes to the total properties in other passages.
<<set $crystal.green+=1>>

My problem is the $crystal.total still remains zero rather than "auto-calculated" with new values in red, yellow, etc.

Thanks in advance for your help.

[Twine 2+Harlowe 1.2.2] Is there a way to let readers search the text from all passages ?

$
0
0
The expectation is, once the given string (can be one or more words) is totally contained in any of the passages, list all the passages as links and let readers choose to quickly view details.

Right now I just have a prompt macro to accept the text from readers and then have it stored as below:
(set: $search to (prompt: "Please provide any key words you're looking for:"))

I can see 2 troubles here:
1. search and match $search in the story scope (i.e. all passages)
2. if #1 returns true, display all the passage names which contain $search

Unfortunately, I've no idea with both so currently have to just use goto $search to run if that exactly matches an existing passage.
Any helps or suggestions on this please ?

Archive just one project?

$
0
0
Twine 2.0.10. Is it possible to archive just one project rather than every project I have? I often need to work on a project on multiple computers and emailing myself the archive file generally works fine. But importing that archive file it means that it creates new versions of all the other projects I've ever done as well as my current. Am I missing out some better method?

[SugarCube 2 + Twine 2] Keyboard Navigation?

$
0
0
Hey everyone,

I have a question that I though would be more of less easy to solve, yet after hours and hours of trying I can't seem to get it to work!

Info: Twine 2.0 and SugarCube 2.6.2 on a Mac
I'm working on a story with no text input from the reader, but the ability to decide by button pressing which passage they'll move on to. It's a text heavy story, so I've been looking for a way to have the text build up more dynamically for the reader instead of loading huge chunks at once. And I do want them eventually on the same page for the reader so they can scroll back up if they want to.

I started off having buttons that will trigger the next big segment to appear on the same page by using <<display>>, thereby segmenting one long text into 3-4 passages and have them click their way through the build up before the reader is prompted to make a decision. By that time he has the whole text to his disposal when he makes the final decision.

I like the fact that the reader can decide their own pace that way, but I want to get away from the buttons and make everything smoother for the reader, by having them use either the Enter key, or SpaceBar to build up the text.
(I know it's possible to trigger text passages via timer, but I'd really love to have the reader click on his own pace.)

What would be the best way to do this?

I know I'll have to work with variables to make the function load the appropriate paragraph each time and so I can unset that variable on passages where I need them to stop, but right now I can't even figure out how to have text appear below an existing passage by keypress.
Please keep in mind that the text it will load will at some point include macros (for example the buttons at the end), so any macro/variables/etc. should work within the loaded segment.

Is there any way I could do this, or am I forever stuck with buttons?
(-> if I can get this to work I'd ideally want to try to also have A/S/W/D keybindings for the decision buttons eventually, so people could read and interact by using their mouse, OR just their keyboard. But one step at a time!)

I'd appreciate any help I can get!

[Sugarcube] For loops and Click

$
0
0
So I have some code that doesn't work, and I'm not sure why.
<<for $i to 0; $i < $party.length; $i++>>
    <<click "Delete Member">>
        <<print '<<set $party.deleteAt('+$i+')>>'>>
        <<print '<<goto "' + passage() + '">>'>>
    <</click>>
<</for>>

In theory, this code should loop through all party members and display a button saying "Delete Member" for each which, when clicked, deletes the member at that index.
However, rather than deleting the member at index $i, like it's supposed to, it deletes the member at $party.length resulting in an out-of-bounds error.
Obviously this means that $i is not being "memorized" by the print statement as it should be... Why is that? How can I fix it? I'm at a bit of a loss.

Time limit on story in Twine 2.0

$
0
0
Hi Guys!

First time posting here so I hope I'm doing this right, I tried to find an answer to this question on google for quite sometime.

So I am very new to Twine 2.0 and just Twine in general. I'm creating a story that has what I guess you would call a bit of an open world. I want to add an overall time limit for the player though, that activates at a certain passage and continues through multiple passages until the end of the game and counts down from a certain number of minutes until 0. I also dont want this to begin at the very start of the game either, only after about 7 passages.

Is this possible?

Cheers

Using Google Fonts in Harlowe

$
0
0
Hey! This isn't a question, just an explanation for posterity. If it counts as spam or anything, by all means feel free to delete or lock this.

Using a Google Font in Harlowe

1. Click the name of your story, next to the house/home icon.
2. Click 'Edit CSS Stylsheet'
3. Go to the Google Font you want to use
4. Look for the "@import url" section. In the new Google Fonts 2.0 , you can find it under the 'embed' tab.

Paste that bad boy into your Stylesheet at the very top. For example,
@import 'https://fonts.googleapis.com/css?family=Exo+2';
Then, paste the following into your stylesheet right below it.
html {
	font: 100% 'Exo+2', sans-serif;
}
tw-story {
	font-size: 1.1em;
}

Replace 'Exo+2' and sans-serif with the listed items on that page for Google Fonts. It might be 'serif' for example.

The end result? You'll get something like this for Oswald:
@import url(https://fonts.googleapis.com/css?family=Oswald);

html {
	font: 100% 'Oswald', sans-serif;

}
tw-story {
	
}

Is there a way to make text appear as RPG games?

$
0
0
Hello everyone,

I am new to Twine.

I wonder if there is a way to print text like old school RPG games letter by letter?

Thank you :)

Is it possible to make a "parser-style" game using Twine?

$
0
0
The question in more detail: Is it possible to make a parser-style game, or something rather close, in Twine 2.0 without having to get pretty deep into code? My main goal is to obfuscate some of the possible path options on certain pages. Maybe I'm just not thinking "outside of the box" here but I'm an oldbie and my mind immediately goes to command line inputs like "examine <thing>" where "thing" could be anything notable in the text.

It could be in either Harlowe or SugarCube. I'm flexible at this point except for having some concern over my scripting skills.

I just really don't want to have to go to Inform for this project since the intended audience is people who wouldn't understand having to install an interpreter.

I hope this makes sense. I don't really have all the correct language for this sort of thing (yet). Ask me to build a MU* and I'd feel fairly comfortable but otherwise I've quite fallen behind on modern options. ^_^;

Thank you!
-coyohti

Viewing all 1844 articles
Browse latest View live