+I Am Sir Thanks so much! I'm glad they've been helpful. I had a short story published last year. You can find it over here: www.bodypartsmagazine.com/4-the-turning-of-the-worm-by-brian-douglas-moakley.html Cheers!
Really like these tutorials. I'm new to Twine, have a little bit of very basic knowledge of code concepts (have heard of variables and things) but this is really helping me understand programming better. One little thing that I don't know if you can do anything about on this video - in the last few seconds it covers the video with some previews of your other videos, which I can't close, so I wasn't able to see the final output of your demo. Not a huge deal, but if it's something you can turn off, or at least be aware of when editing your future videos (maybe add some extra time at the end) that would be great as I wouldn't want to miss anything!
+Dot Doty Harlowe contains a (prompt:) macro. I haven't used it so you'll have to play with the syntax or consult the Twine forums. Personally, I'd avoid direct prompting from the user as it opens a whole can of worms. You'll have to perform some sort of validation on the return and it feels very much against the spirit of Twine. A better way may be to provide a list of letters to the user that they can pick one at a time. Good luck!
Hope you can help, I am looking for a way to show previous text on my stories so that people know what was said before and what choice you took. I found it on the Jonah format in twine 1 but not twine 2.
Thank you so much for your video! How would you add a code in Harlowe that if you collect a certain amount of your inventory, the game ends? I can't figure it out.
It would depend on the inventory items or the complexity of what you have to pick: For Example: Lets say I have to pick 10 apples, so I could put You stroll thorugh a field, picking apples (Link-reload: 'You pick an apple')[(set: $ApplesNumber to $ApplesNumber + 1)] And in a different passage you put: (If: $ApplesNumber is > 9)[(link:'You have collected all the apples')[(goto:'Passage The End')]](else:)[You continue to pick apples.] Another Example: (set: $wizard to (dataset: "Hat", "Magic robes")) (link: "Grab the hat")[ (set: $playerInventory to (dataset: "Hat"))You have grabbed the hat] (link: "Grab the magic robes")[ (set: $playerInventory to $playerInventory + "Magic robes")You have grabbed the robes] And in a different passage you put something like: (if: $playerInventory contains "Hat" and $playerInventory contains "Magic robes")[(link:"You are a wizard")[(goto: "Passage The End")]] (in this case I put the list of items in a dataset -an unordered list-, but it also could be an array -an ordered list-, or maybe even a datamap) Hope it helped
How do I make it so the Conditions I write don't displace the text that actually shows? Like how your story text appears towards the bottom of the page @12:35 after you entered the $hoursAsNumber conditions VegetarianZombie
Avery LaFlamme Typically what happens is that Twine interprets any carriage return as a separate line, so the trick to prevent unwanted spaces is to place your code right after your sentence. It kind of destroys the readability of it, but it should prevent unwanted spaces.
Okay this makes sense using variables, but how would you do this with just simple choices. For example, I want a branch in my game to have a character absent. I would like to have a part of the text show up if the character is in the game or not show up if they aren't in the same passage. Otherwise I would need to make entire other versions of every passage along that path. Is there a way to just say (if choice whatever was chosen) ?
+Larkawolfsgirl Without seeing what you mean in code, it would probably be easier having two different passages. You could combine them and do everything in one passage, but that would probably make the code overly complex and prone to bugs. I hope that helps!
Yes, I think I will just do that. I didn't want to deal with that many additional passages, but at this point I don't have time to mess with these variables. Thanks for the help, though.
Looking for assistance. The code is running sort of ok and in debug mode it shows which passage is supposed to come up, but instead, both of my if statements for the condition end up showing on the same page. What did I do wrong? (if: $minutesDigging is 10) [Screening for artifacts isn't quite what you had in mind, you'd prefer to switch over to digging.] (if: $minutesDigging > 10) [You've been screening soil for $minutesDigging minutes. Unfortunately, since you're in fill, this layer of dirt is pretty tough to get through. You hit your shovel into the ground several times, hauling out a new shovel-full of dirt and tossing it into a bucket. When the bucket is full, someone else dumps the soil into a screen and gives you an empty bucket to refill. You think this is pretty fun at first, but after the first bucket of soil you feel your arms growing weary from the labor.]
Hi, I don't know if you're still looking at the comments, but I really need help here. So I've been doing what you have done so far and looks like it's not working with latest version of twine. The (if: ) condition doesn't give me a single answer but continues to display the 2 options I wrote. In the debug I see no condition after the (if: ). Any tip? Thanks for sharing. G
+Gerald Holubowicz If you post your Twine code, I'll take a look. I'm guessing it's probably a typo that you may be overlooking. Once I have the code, I should be able to find it for you. Cheers!
+Gerald Holubowicz I'm new to Twine, but I quickly found bugs in the latest version (2.0.9) and had to switch back to the twine_2.0.9pre2 version. e.g. in 2.0.9 the following does NOT work (set: $item to "key") (set: $weapon to "crowbar") (if: $item is "key" and $weapon is "crowbar")[I have both required things] (if: ($item is "key" and $weapon is not "crowbar") or ($item is not "key" and $weapon is "crowbar"))[I have one of the required things] (if: $item is not "key" and $weapon is not "crowbar")[I have none of the required things] I assumed I had made a mistake and wasted a lot of time testing. The 'else' does not work
Willie Wardlaw I got some help on the Twine forums. They suggested that I replace the second "if" statement with an "else" statement. That got it to work for me. I still don't know why your method wouldn't work on the current version. On a side note, I hear the term "seal of gunk" in my sleep now! :-)
Willie Wardlaw While the else statement may work, it may cause some unwanted behavior. For example, if the $hoursAsleep value is 4, then the player will still get the text for sleeping over 12 hours. To debug this issue, you should first check to see if the $hoursAsleep variable is actually set to something. An easy solution would be to print out the result on the page. If the variable is set to something, then create a new variable on the page, set it to the value, and play around with the if statement to make sure it works. If you do get it to work, then compare your working result with the broken result. Check the statement, character by character to make sure you haven't missed anything. In my experience, it's incredibly rare for a framework like this to break something so fundamental to its usage. If this were to happen, then we'd probably see a patch in a few days. More often than not, it's a misplaced character such as an unclosed if statement. I hope that helps and welcome to the world of debugging! Hopefully, with a little investigation, we can rid the seal of gunk from your dreams! :) Cheers!
VegetarianZombie I feel like a doofus! It was a completely amateur mistake on my part. I put the word "is" before the ">" in my code. Thank you again for your help.
Dude, I have a massive problem, and there aren't many active users of Twine I know that can help. I am making a rather huge story within Twine and I have encountered a problem. I have a page with a long list of "if" statements. Now, I expected the text to move up and ignore the other text there as if it didn't exist but it seems to have saved the spaces meaning that some of the text has a huge blank space above it. Can you please help me fix this?
Put those curly brackets above and below your if statements. I think its called closing whitespace, or something like that. { if statements here if statements here if statements here } Like the above sample, like that.
I'm one year late as well but hope this helps: To assign a string/ text to a variable put the value between "these" or 'these' To replace the value just use another (set:) or (put:). The first time it creates the variable, the next time it modifies it. For Example: (set: $clothes to "blue sweater") You're wearing a $clothes (link: 'But I want to wear the red sweater instead!')[(set: $clothes to 'red sweater') You have changed into $clothes ] or (put: "Blue" into $favouriteColor) Your color is $favouriteColor (link: 'I prefer yellow instead')[(put: "yellow" into $favouriteColor) Your color is now $favouriteColor ]
Yeah - this was made back using Harlowe 1.0. Since then, things have changed dramatically. I was working on an updated version of this series, but got distracted. I'll see if I can get it back on track.
LOL, I keep watching this video to get it, and I just realized you are using Boolean logic-- that's the theory part, the coding in this engine is not second nature for me as of yet.
I thoroughly enjoy watching these tutorials. Very nice!
+shizzlepecks Thanks so much! It makes them worthwhile to hear it!
Thanks!
Dude thank you for these. They are immensely helpful! Have you published anything? Your writing is great!
+I Am Sir Thanks so much! I'm glad they've been helpful. I had a short story published last year. You can find it over here:
www.bodypartsmagazine.com/4-the-turning-of-the-worm-by-brian-douglas-moakley.html
Cheers!
Really like these tutorials. I'm new to Twine, have a little bit of very basic knowledge of code concepts (have heard of variables and things) but this is really helping me understand programming better. One little thing that I don't know if you can do anything about on this video - in the last few seconds it covers the video with some previews of your other videos, which I can't close, so I wasn't able to see the final output of your demo. Not a huge deal, but if it's something you can turn off, or at least be aware of when editing your future videos (maybe add some extra time at the end) that would be great as I wouldn't want to miss anything!
+Dot Doty Harlowe contains a (prompt:) macro. I haven't used it so you'll have to play with the syntax or consult the Twine forums. Personally, I'd avoid direct prompting from the user as it opens a whole can of worms. You'll have to perform some sort of validation on the return and it feels very much against the spirit of Twine.
A better way may be to provide a list of letters to the user that they can pick one at a time. Good luck!
"Choice. It's the best part of being a real person."
How do I do something like this : Whats your name ?, type it, and then the name will appear in the rest of the game ?
Hope you can help, I am looking for a way to show previous text on my stories so that people know what was said before and what choice you took. I found it on the Jonah format in twine 1 but not twine 2.
Thank you so much for your video! How would you add a code in Harlowe that if you collect a certain amount of your inventory, the game ends? I can't figure it out.
It would depend on the inventory items or the complexity of what you have to pick:
For Example:
Lets say I have to pick 10 apples, so I could put
You stroll thorugh a field, picking apples (Link-reload: 'You pick an apple')[(set: $ApplesNumber to $ApplesNumber + 1)]
And in a different passage you put:
(If: $ApplesNumber is > 9)[(link:'You have collected all the apples')[(goto:'Passage The End')]](else:)[You continue to pick apples.]
Another Example:
(set: $wizard to (dataset: "Hat", "Magic robes"))
(link: "Grab the hat")[ (set: $playerInventory to (dataset: "Hat"))You have grabbed the hat]
(link: "Grab the magic robes")[ (set: $playerInventory to $playerInventory + "Magic robes")You have grabbed the robes]
And in a different passage you put something like:
(if: $playerInventory contains "Hat" and $playerInventory contains "Magic robes")[(link:"You are a wizard")[(goto: "Passage The End")]]
(in this case I put the list of items in a dataset -an unordered list-, but it also could be an array -an ordered list-, or maybe even a datamap)
Hope it helped
Good tutorials, thanks for making them
I notice this works when dealing with numbers, but what about other options?
How do I make it so the Conditions I write don't displace the text that actually shows? Like how your story text appears towards the bottom of the page @12:35 after you entered the $hoursAsNumber conditions
VegetarianZombie
Avery LaFlamme Typically what happens is that Twine interprets any carriage return as a separate line, so the trick to prevent unwanted spaces is to place your code right after your sentence. It kind of destroys the readability of it, but it should prevent unwanted spaces.
The brackets are showing up when I hit play. How do I get rid of them? I made sure my text was exactly the same as yours.
i'm getting an error. Is the format here Harlow?
It says the (if:) command should be assigned to a variable or attached to a hook.
looks like the [text] after the (if:) cannot have a space in-between like you show now.
I've been arguing with my computer for twenty minutes on that! THANK YOU!
Okay this makes sense using variables, but how would you do this with just simple choices. For example, I want a branch in my game to have a character absent. I would like to have a part of the text show up if the character is in the game or not show up if they aren't in the same passage. Otherwise I would need to make entire other versions of every passage along that path. Is there a way to just say (if choice whatever was chosen) ?
+Larkawolfsgirl Without seeing what you mean in code, it would probably be easier having two different passages. You could combine them and do everything in one passage, but that would probably make the code overly complex and prone to bugs. I hope that helps!
Yes, I think I will just do that. I didn't want to deal with that many additional passages, but at this point I don't have time to mess with these variables. Thanks for the help, though.
Looking for assistance. The code is running sort of ok and in debug mode it shows which passage is supposed to come up, but instead, both of my if statements for the condition end up showing on the same page. What did I do wrong?
(if: $minutesDigging is 10) [Screening for artifacts isn't quite what you had in mind, you'd prefer to switch over to digging.]
(if: $minutesDigging > 10) [You've been screening soil for $minutesDigging minutes. Unfortunately, since you're in fill, this layer of dirt is pretty tough to get through. You hit your shovel into the ground several times, hauling out a new shovel-full of dirt and tossing it into a bucket. When the bucket is full, someone else dumps the soil into a screen and gives you an empty bucket to refill. You think this is pretty fun at first, but after the first bucket of soil you feel your arms growing weary from the labor.]
Hi, I don't know if you're still looking at the comments, but I really need help here. So I've been doing what you have done so far and looks like it's not working with latest version of twine. The (if: ) condition doesn't give me a single answer but continues to display the 2 options I wrote. In the debug I see no condition after the (if: ). Any tip? Thanks for sharing. G
+Gerald Holubowicz If you post your Twine code, I'll take a look. I'm guessing it's probably a typo that you may be overlooking. Once I have the code, I should be able to find it for you. Cheers!
+Gerald Holubowicz how you need to write is without any spaces example: (if: $value is x)[write text here] that worked for me at least.
+Gerald Holubowicz I'm new to Twine, but I quickly found bugs in the latest version (2.0.9) and had to switch back to the twine_2.0.9pre2 version.
e.g. in 2.0.9 the following does NOT work
(set: $item to "key")
(set: $weapon to "crowbar")
(if: $item is "key" and $weapon is "crowbar")[I have both required things]
(if: ($item is "key" and $weapon is not "crowbar") or ($item is not "key" and $weapon is "crowbar"))[I have one of the required things]
(if: $item is not "key" and $weapon is not "crowbar")[I have none of the required things]
I assumed I had made a mistake and wasted a lot of time testing. The 'else' does not work
Thanks .
You're the best.
Could i do that with text?
I'm using Twine 2.0.4. My text that follows "(if: $hoursAsleep is > 8)" does not display. I think it may be an issue with the current version.
Willie Wardlaw I got some help on the Twine forums. They suggested that I replace the second "if" statement with an "else" statement. That got it to work for me. I still don't know why your method wouldn't work on the current version. On a side note, I hear the term "seal of gunk" in my sleep now! :-)
Willie Wardlaw While the else statement may work, it may cause some unwanted behavior. For example, if the $hoursAsleep value is 4, then the player will still get the text for sleeping over 12 hours.
To debug this issue, you should first check to see if the $hoursAsleep variable is actually set to something. An easy solution would be to print out the result on the page. If the variable is set to something, then create a new variable on the page, set it to the value, and play around with the if statement to make sure it works. If you do get it to work, then compare your working result with the broken result. Check the statement, character by character to make sure you haven't missed anything.
In my experience, it's incredibly rare for a framework like this to break something so fundamental to its usage. If this were to happen, then we'd probably see a patch in a few days. More often than not, it's a misplaced character such as an unclosed if statement.
I hope that helps and welcome to the world of debugging! Hopefully, with a little investigation, we can rid the seal of gunk from your dreams! :)
Cheers!
VegetarianZombie I feel like a doofus! It was a completely amateur mistake on my part. I put the word "is" before the ">" in my code. Thank you again for your help.
Thank you so much!
Dude, I have a massive problem, and there aren't many active users of Twine I know that can help. I am making a rather huge story within Twine and I have encountered a problem. I have a page with a long list of "if" statements. Now, I expected the text to move up and ignore the other text there as if it didn't exist but it seems to have saved the spaces meaning that some of the text has a huge blank space above it. Can you please help me fix this?
Put those curly brackets above and below your if statements. I think its called closing whitespace, or something like that.
{
if statements here
if statements here
if statements here
}
Like the above sample, like that.
Ik im 3 years late but how could I make the varabile be text and then change the text depending on choices
I'm one year late as well but hope this helps:
To assign a string/ text to a variable put the value between "these" or 'these'
To replace the value just use another (set:) or (put:). The first time it creates the variable, the next time it modifies it.
For Example:
(set: $clothes to "blue sweater")
You're wearing a $clothes
(link: 'But I want to wear the red sweater instead!')[(set: $clothes to 'red sweater') You have changed into $clothes ]
or
(put: "Blue" into $favouriteColor)
Your color is $favouriteColor
(link: 'I prefer yellow instead')[(put: "yellow" into $favouriteColor) Your color is now $favouriteColor ]
Very nice tutorial but it's not working for me. I think its because I use the new Twine, but who knows for sure.
Yeah - this was made back using Harlowe 1.0. Since then, things have changed dramatically. I was working on an updated version of this series, but got distracted. I'll see if I can get it back on track.
LOL, I keep watching this video to get it, and I just realized you are using Boolean logic-- that's the theory part, the coding in this engine is not second nature for me as of yet.
80s baybees 😅 👍
I should be doing homework rn.... oh well!
Hahaha Devo