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

Can I create my own save menu?

$
0
0
Hihi, I'm using sugarcube v2 and I'm still learning a lot of things, I'm trying to create a little game with a save menu, I like the menu by default but I would like to create my own if its possible (I'm really new with programing codes and that). I saw that in Harlowe version there is a save game macro, but I couldn't find it in sugarcube.
There is a way to create this menu?, or at least modify the one by default?, there are macro for that?, its too much complicated?.

This is how its looks like now:
9745524m1.png

And I would like to do something like this:
97455270c81341d2b6c30d04e66.png

I'm begging a little light, I really tried to find tutorials or something related whitout any luck.


Character Name Twine 2 Sugarcube 1.03.34

$
0
0
Hey guys, I have a quick question

In my game I want the user to be able to name their character

I have the CSS for the textbox (<<textbox "$name" $name>>), that the character will use to set their name. What would be the CSS for the character's name to be displayed throughout the story?

For example, if I name myself "Bob" in the textbox and then next passage I want it to say "Good job 'Bob'"

Retrieving Array Information out of a For Loop [Twine 2 / Sugarcube 2]

$
0
0
Hi, I already asked this on the Q&A forum but only got 1 reply which was not related to the question so I am hoping for a better response here.
In Twine 2 / Sugarcube 2
I have a series of arrays holding data for NPCs generated in the process of my game.
The code is below but in summary a for loop counted against the number of NPCs creates a table displaying the names of the NPCs, What I am looking for is a way to select a name from the table and go to a passage which will populate with information from the series of arrays.

The simple solution would be to have the loop number each entry and then use a text box for the player to enter the number and have the game capture that to reference the array position for the next passage. But this feels crude and hackish.

What I want is a way to select the information by a single click by turning the name into a link, Abandoning the loop is acceptable for a better solution but I don't want to limit the number of stored records if at all possible.

(Note the passage is currently in a prototype stage so presentation is a low priority)
Currently you have <<print $NPCGender.length >> Generated characters

<table>
	<<for $i=0; $i<$NPCGender.length; $i++>>\
		<tr>
			<<print "Name: ">> /*Male*/<<if $NPCGender[$i] lte 3 >> <<print $MFNameList[$Firstname[$i]]>><<print ", ">> <<print "Nickname: ">> <<print $MNNameList[$Nickname[$i]]>><</if>>/*Female*/<<if $NPCGender[$i] gte 4 >> <<print $FFNameList[$Firstname[$i]]>><<print ", ">> <<print "Nickname: ">> <<print $FNNameList[$Nickname[$i]]>><</if>><<print ", ">> Gender: <<print $GenderList[$NPCGender[$i]]>>	
		</tr>
	<</for>>
</table>

How to choose a story format?

$
0
0
I haven't found any Twine documentation providing advice on how to choose a story format, but this choice seems awfully important. (For that matter, I'm not entirely clear on how to choose a Twine version.) What are the important considerations? When does it make sense to choose one over another?

I had initially assumed they were just style sheets, but it's becoming increasingly clear to me that they are something more akin to mutually incompatible programming languages with different capabilities.

Thank you!

Twine 2.1.3 not working

$
0
0
Hi all,
I've just downloaded the new Twine, 2.1.3 but when I open it I get a blank application (see attached file)
Any ideas?

SugarCube 2/Twine 2 — have a div "reveal" when the player clicks/taps the screen

$
0
0
I swear I saw this implemented somewhere already but I can't remember what I read and it's driving me mad.

I'd like to structure the passage so that text is revealed as the player clicks or taps the game screen — conceptually, like revealing a paragraph (or whatever arbitrary length of text I want) at a time so the player progresses at their own pace instead of presenting them with a sudden wall of text.

I don't want the passage to change, just the text to gradually appear until the player reaches the section where they're presented with a choice to make — at which point they move on to another passage as normal.

I came across this

https://www.glorioustrainwrecks.com/node/5019

which potentially is what I want (the continue macro) but I know SugarCube 2 has its own continue macro that I think is unrelated to this completely.

I don't want to eliminate or replace text on the screen, just have a div slide into place when the player clicks.

Help with arrays in sugarcube 2

$
0
0
Hello

I'm sorry if this is a very noobish question, but i'm having a hard time understand arrays in general, so here goes.

I'm trying to make a "trait" system, with different ranks, so say your character has 3 levels of a given trait, namely "Strength", which goes like this "nStr, Str1, Str2, Str3", where nStr represents not having the trait at all.

How could i include something like this in an array, so i can merely print all of your characters traits in one go, like a list? example: $traitlist

If we say that there also exist a leveled traits for Dexterity and Intelligence, then a printed example would look something like this:

Traits = $traitlist ==> Traits = Str2, Dex1, Int3

and in case you had nStr (which is not having the trait at all, then it would look like this:

Traits = $traitlist ==> Traits = Dex1, Int3

It would also be fine if there was an way to make an array where you could just throw in objects and take them out. I am not too keen on widgets, and i would very much appreciate it if it was kept simple.

Thank you very much.

ps

I read the Sugarcube document, but couldn't find anything helping with something like this.

Any way to hide or minimize the Debug Test Mode window in Twine 2?

$
0
0
When running a passage in Test Mode in Twine 2 (Mac OS - Harlowe Story Format), is there a way to hide or minimize the window in the bottom right corner of the passage? The window shows the running list of variables and the "Debug Mode" button.

It is very useful, but when I try to test the window size as a half-desktop-screen (approx the screen size of an iPad in portrait mode) it covers text in the passage. It's not there when I "play", but I don't want to play through the whole game to get to this one page to test it.

Any ideas?

Thanks!

Making a 'shop' menu, or dynamically populating a list and reading what the player clicked back

$
0
0
Hello all.

So, I am having a good time with Twine 2. Using the default Harlowe 2.0.1 format.

Here is what I have run up against. I want to make a clickable menu of choices for the player to purchase from a shop. I have a passage where I populate a dm with weapons, in the format "weapon name", "damage" for a bunch of weapons.

While I have no issue putting them onto the screen, all linked up and clickable using a for loop and the (click:) command, I cannot figure out how to read back what the player chose later. Obviously if I try to read back temp variable, it doesn't work as the variable went out of scope long before the player clicked.

It would be fine if I could read back the text of the clicked link, but I don't know how.

Anyway, to make it short: I want to populate a shop with links to buy items, find out what item the player chose, and then move on with that info (deducting gold from their inventory, etc.), and for whatever reason this has me stumped.

Making a multi part RPG with a simple battle system. Do you mind helping a noob out?

$
0
0
(This first part isn't 100% relevant to my question, so if you want to get to the question, just real below this paragraph) So a few months I decided to create a video game based on my IFunny profile for the members of my discord server (Yes I created an entire lore based on a profile on a meme app. That's some real commitment) So the game that I want to make will be an episodic RPG, kind of like a telltale game.

At first, it seemed easy because first part of the game had no combat or randomized sections at all. But I eventually got to the point to where I had to create a battle system. The battle system has to have a visible health and stamina system, as well as enemy health. I also want the enemy's attacks to be randomized. Looks are a secondary concern to me as of right now but if I I got any tips on making the game visually presentable at least, that would be nice. Can anyone give me some tips on how to do this? I'm using sugar cube 2.18.0 by the way

Changing the background in Harlowe 2?

$
0
0
I've tried everything I can think of to change the background of my story using the CSS Stylesheet. I tried everything i can think of and I've scraped the forums. At first I tried to use a .jpg but that didn't work so I tried the simple code
body {
background-color: blue;
}
and that doesn't work either. Someone please help.

Go To Link displays blank page

$
0
0
I am using SugarCube 2.18.0 and Twine 2.1.3.

Okay so I have a time system in place and I wanted the player to be forced to 'sleep' after a certain time and then the day would go to the next and the 'time' would reset.

There are 8 turns in a day but the 'turns' arent counted by systems' original turn counter, it's counted by a special tag so specific passages don't take up time but others take up a lot of time (like three turns). I have the time displayed in a header and it follows the time really nicely.

Until I get to after the 8th turn (which is when the player is to be sent to sleep).

As I have the code right now, the passages up the turn and then my PassageReady page figures out if it's past the 8th turn and it's supposed to goto send you to the [[Late] passage which links to [[Sleep]] passage.
<<if $turn > 8>><<goto [[Late]]>><</if>>

The problem is, every time I test it after turn 8, it just...stops. It sends me to a blank page with nothing.

The passage it's supposed to send you to looks like this:
It's late and you are tired. You decide to get some sleep.

[[Rest|Rest]]

But again, it's blank.

Should I just have the player return to the base and have an if statement say after turn 8 the only thing you can do is sleep?

Style compatibility problem with Adobe Muse

$
0
0
Good afternoon,

I built a project with Twine 2.0 using Harlowe and I styled my links and passages with the built-in CSS editor on Twine.
I need to embed my game inside a website created with Adobe Muse, so what I do is I export the HTML file from Twine and then embed this code within Muse going on "Object/Insert HTML".

What happens next is that most of the styling I have done is completely ignored (the sidebar that I set to "display: none" is there, the background color is back to black...) while some of them (like the border) they are applied.

Do you know what can cause this problem and how can I fix it?

Can't change background in Harlowe 2.0.1

$
0
0
Hello Everyone!
I'm a beginner in Twine (I work only five days with this beautiful program) and I have a question. I don't understand how to change background in Harlowe 2.0.1. I should mention that I read a lot of topics and watched lessons on YouTube. But I still can't do it. Nothing helped me. (I should say that I don't know how to work with CSS yet, I know only few basic "commands").
Every lesson says that I should write:
body {
background-image:url("imagename.jpg")
}

When I write this code to my project - nothing happens.

1st screenshot: Before Editing
2nd screenshot: Editing
3rd screenshot: After Editing
[img][/img]

Music in Harlowe 2.0.1

$
0
0
Hello Everyone! As I mentioned in my previous topic - I'm a beginner in Twine. With your help I figured how to change background in Harlowe 2.0.1 (Thanks to @idling). I made a big step forward with this forum. Now I have another question. I can't add music to my project (I've already read topics about music in Harlowe 2.0.1, but I still can't find a solution). So, as every topic/lesson says I should write this text in my passage:
<audio src="music url (I use DropBox to save music that I create by myself)" autoplay>
or
<audio src="music url">

I add this to my passage, but music doesn't play.

Difference between (array:) and (dataset:)

$
0
0
I know its a silly question but I am new to this and they look too similar.

How to reduce variables to each visited passage with turns() function?

$
0
0
How can I subtract 1 from my variables $sleep, $food and $water for each time the player visits a passage? With the function turns()?

Please, anybody help me?

I use SugarCube 2.18.0.

how can I change (if:)'s value's at the same passage?

$
0
0
What I mean is this:

_______[something]<a|______
(click:?a)[(set $b to 1)]
(if: $b is 1)[something else]

and (if:) doesn't work.My guess is you actually cant change values and react to changes at the same passage but I guess it doesnt hurt to ask right?

Sugarcube 2.x, making a variable to not get saved in each state, in between passage transitions

$
0
0
Hi all,

I would like to define variables such that they won't be get saved each time in States object, like a constant, because I have lots of javascript object that they dont change throughout my twine project but they are defined with $ prefix. My twine project started to have lags because of huge collection of objects that's (I suppose- ) cloned each time when I proceed to a new passage.

But they must be accessible globally, within the twine system like how I normally access a variable;
// in some mysterious passage

<<for each _item in constant_object_collection_somehow_global>>

<<print _item[_i].name>>

How to change background only in one passage in Harlowe 2.0.1?

$
0
0
Hello Everyone!
I've nearly finished my first project in Twine (As I said before - I'm a beginner in Twine). And I have one last question. Is it possible to change background only in one passage? I tried to find any answers on Forum, but it seems that there's no answer.
Viewing all 1844 articles
Browse latest View live