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

How do I add a sidebar in Harlowe?

$
0
0
I would like to be able to add a button that the user can click that will send them to the main menu, one so they can see acknowledgments, and maybe one to close the game.

Hello, can anyone help? What's wrong in such macro?

$
0
0
Hello, I am new, using Harlowe and I am trying such macro:

(set:$s1 to 0)

(link-reveal:"Click me")[(set:$s1 to 2)]

(if:$s1 is 2)[You find a new way]

The last sentence never print those text out. What's wrong with those Macro?

I try to change the last row into this:

(click:"check again")[(if:$s1 is 2)[You find a new way]]

and it display this sentence if I click the the one above last. Dose that mean the state of that (if:) won't change once it displayed? Usually, how do you guys do this?

This is one newbie from China. Well trying to write something interesting with this amazing tool. Thank you guys! :)

[Harlowe] Need help with order of multiple (replace:) macros

$
0
0
I want to have a piece of text change to something else when clicked once, then change to a different thing when clicked again. I understand the basics of this, using hooks and (replace:), but I can't figure out how to control the order that multiple (replace:)s get replaced in. The code below first turns "heard" to "got her message" then to "heard the news", when it should become "heard the news" first and then "got her message".
That's what you first thought when you [heard]<how| last night.

(click: ?how)[ (replace: ?how)[heard the news]]
(click: ?how)[ (replace: ?how)[got her message]]

How do I add buttons to the sidebar in Harlowe and Twine 2?

$
0
0
I would like to add a few buttons to the sidebar (and maybe entirely move it to the bottom of the screen); one for going back to the main menu, one for achievements, going to the map, acknowledgements, etc. I can't find anything about doing it in Harlowe; all I've found is Sugarcube. I'm really new to programming and know hardly anything; I'm learning as I go.

having trouble with basic inventory

$
0
0
Hello I am completely new to this and I have been pouring over forum links and the Harlowe wiki and for the life of me I can't figure out what is wrong.

I started with this site which gave the the basics but its an array. I am going to use just word based things so I think a data set would be better (ds:) so i added that instead.

I would like to have a thing that only displays a link if you have something in your inventory.
here is my code:
"I dont know much, but I know I am feeling like spagetti. Here is a list of ingredients."
(set: $inv to $inv + ("list"))

[[Do you have any money?|money]]
(if: $inv is in ("some money"))[[Go outside|outside]]

and I keep getting
the number 0 cannot contain any values, let alone the string "list"
and I can't figure out how to fix it. Did i get the syntax wrong?

Arrays as object properties

$
0
0
I am using the most current version of Sugarcube and Twine 2 and I have an object set up that has an array as one of its properties, and now I need to pull out a specific element in that array and I'm having problems.

Code below.
<<for $ca=0;$ca<4;$ca++>>\
	<<switch $chararray[$ca]>>\
		<<case "chief">>\
			<<if $chief.where[$chief.plot] == $actloc>>\
				Continue the Chief's plot at this location by talking to the $chief.who[$chief.plot].\
			<</if>>\

When I use this particular notation $chief.where[$chief.plot], I get back the full array of $chief.where, plus the current value of $chief.plot, not the specific element within the $chief.where that is located at the $chief.plot place, which is what I want.

Any suggestions?

Event trigger after a set amount of time? (SugerCube)

$
0
0
Heya, so I'm trying to create an event that appears after a certain amount of time in-game has been reached (using the Javascript shown here).

For example: I would like that after 1 week in-game has happened, it will take the reader to a certain passage/event automatically. But... I'm not entirely sure how I can do that.

I've been looking through the forum and miscellaneous sites for some help but I can't really find anything that works so far.

Does anybody have any tips on how I can do this? Thank you !

Sound on/off in Sugarcube

$
0
0
How to turn a soundfile/music on/off in Subarcube 2.14?

The music is not on the internet but, will be provided as a file.

Custom Save File Names

$
0
0
I want to be able to call upon save files that the player can name and eventually load up again.
I have got the custom names working but I can't print links to load the save file with the custom name.
The
(load-game:)
macro requires you to know what the save file was in order to have a link to load it.
(if: (save-game: (prompt: "Name your Save" + " "(current-time:) + " " (current-date:))))
[Game Saved. (current-time:)](else:)[Save Failed]
Any suggestions?

New Sugarcube release : StoryInterface special passage

$
0
0
Thanks a lot Thomas, for your last release of Sugarcube 2.18.0.
I'm a little bit puzzled with the new StoryInterface special passage. Could you give us a little practical example on how to use it ?

Trouble adding Sugarcube 2.18 to Twine 2.1.1

$
0
0
I'm upgrading to Twine 2.1.1 and Sugarcube 2.18 on Windows. I uninstalled Twine and installed the new version ok, and I've followed the instructions about adding the Sugarcube format.js to Twine, but it's stuck showing "Loading" with the animation. Windows Task Manager shows activity in Twine (>0% and <1% CPU, and about 400kb/s I/O), but it's not moving from that point - I've been waiting over an hour so far.

Has anyone seen this issue before?

Adding a variable only once?

$
0
0
Heya! So I hope this is a pretty simple question: is it possible to have a variable added once (like $money += 3 or whatever), but then if the player returns to the passage again, it doesn't add it a second time?

I'm Using SugerCube 2.16.0 and Twine 2.

Any help would be appreciated! Thank you !

New to Twine, how do I make a text box or input text?

$
0
0
Hi guys,

I'm new to Twine and I've discovered that Twine has thrown away the <<textinput>> format because I saw that this format used to be the old one. I've looked literally all over the internet, I don't know how to read codes, there's no information ANYWHERE on how to simply incorporate a text box aka let the player input text. I'm not talking about putting in their name, I'm talking about actually typing in something. To be more specific, I want the player to type in what it is they are afraid of. Please help, my game is due for a college project on Tuesday ): And as stated, I have no idea how to read codes so if someone could just copy and paste the new format that'd be amazing <3

Twine 2.1.1 closed suddenly

$
0
0
Hello, everyone. Well, it's my first time post here. Actually, each time I want to open my Twine, that just upgraded to 2.1.1, the program would appear for few second, then unexpectedly crushed. That never happened to me in previous Twine 2 version. Even I changed the windows compatibility, it's not working. Any solution? Thanks.

Btw, I am using Windows 10 Pro Edition 64 bit.

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

How can I hide the twine project if I'm sharing the .html?

$
0
0
I realized that you can load your project to Twine with the HTML you get if you click on "Publish to File". You simply click on "Import from File" and select that HTML and everything including Javascript and CSS are put in the right places.

The problem is: I'd like to share this HTML to be played offline but I don't want people to be able to load this HTML. How can I share this file "safely"? I know about some other projects that people were able to do it.

I'm currently using the online version and sugarcube2.

Thank you!

[Harlowe] Passage Within Variable Doesn't Work

$
0
0
Heyo,

I just joined a game dev team as a writer and have been getting used to Twine within the last few days by writing out quests from other games.

In a current "exercise" (with the Bait and Switch quest from Dragon Age 2) I tried this:
(if: $party is "Carver")[ FENRIS: You are skilled. [[I know that much.->Carver Defends Hawke]] ]
(else:)[ FENRIS: You are skilled. [[I know that much.->Fenris Apologises For Being An Arse]] ]

I have a
(set: $party to "Carver")
in the beginning but whenever I reach the above point in the conversation I won't get to either passage I've linked to. The story just ends there, too, which it's not supposed to.

Or this:
(if: $party is "Varric")[ HAWKE: I could stand to know a little more about this [[Danarius.->Fenris Tells About Danarius 2.0]] ]
(else:)[ HAWKE: I could stand to know a little more about this [[Danarius.->Fenris Tells About Danarius]] ]]

The "Fenris Tells About Danarius 2.0" is the same conversation, only with Varric chiming in with a comment. Both eventually lead back to the same passage since it's a loop dialogue option. But even if I choose to take Varric with me in the beginning--I do have a
(set: $party to "Varric")
--it goes to "Fenris Tells About Danarius" immediately, then back to the dialogue choices.

I don't know if it's just me or if it's that passage links don't work with variables or whatever. Gender variables changing pronouns work. Different conversations because the player chose a different class in the beginning work as well. I'm a bit clueless.

Thanks in advance for any answers.

Advice for (Prompt:)

$
0
0
Hi pals,

I'm new to Twine 2.0 (using Harlowe) and using it to create a pretty basic game. My first passage includes a (prompt:) for the player to input their name. It works fine, however for whatever reason, every time I hit play, enter my name and press OK, the game exits and I'm returned back to the edit interface. The second time I hit play, it works fine without a problem. I'm submitting this for a school project so I need it to be working without minor bugs like this - any advice/solutions?

Thank you!!

If elseif statement error

$
0
0
Hello, I'm using SugarCube 2.14.0 on version Twine 2.1.1

I'm having trouble with variables, conditionals and macros, i believe those are the right terms. I am trying to make a game were you can make a choice and it changes your appearance and interactions with characters, I am going to add pictures later in the game but right now I'm going with pure text. My problem is that it doesn't seem to want to read the gender selection right. i will upload pictures of my problem.

Strange beginner question.

$
0
0
Hi! I've messed around a bit with Twine before, and decided to do it again now that 2.1 is available. After installing it and launching it I'm faced with this, however;

dd357aea7a.png

Yep, that's it. If I press "Twine" I can click on "Show library" or "Quit", though nothing happens if I do so. "Edit" just have options of cutting, pasting etc. I can't do anything, not even shut the program down except with the task manager. I've tried reinstalling it, and I'm using the correct version (the Win 64, as that is my OS. I've tried the Win 32 version as well, though).
Viewing all 1844 articles
Browse latest View live