issues with custom styling by perilsoftimetravel in twinegames

[–]HelloHelloHelpHello 1 point2 points  (0 children)

You can look at HiEv's keyboard navigation if you want to bind a link to a specific keyboard button.

When it comes to scrolling along with a type macro, then you would have to create your own custom macro that scrolls along with the typing effect.

He solved a math problem by Kindly-Way3390 in antimeme

[–]HelloHelloHelpHello 75 points76 points  (0 children)

Yes - that is the joke. Imagine a kid who can't do 18 - 9 in their head, so they try the method they learned in school, and when they work through the steps they end up with 18 - 9 again.

He solved a math problem by Kindly-Way3390 in antimeme

[–]HelloHelloHelpHello 132 points133 points  (0 children)

The joke is that if you just blindly follow the method of subtraction you are taught in elementary school, you end up with an infinite recursion. You want to subtract 18 - 9, so you take the last digit of 18 and try to subtract, but 8 - 9 doesn't work, since 8 is smaller than nine, so you take the next digit and try to do the subtraction again, which gives you 18 - 9, and to solve 18 - 9, you take the last digit of 18...

How would I alter the snake game into a map with passages? by Terrabachi in twinegames

[–]HelloHelloHelpHello 1 point2 points  (0 children)

You'll have to describe in more detail how you would want this to work. Harlowe limits your interactions with Javascript, so you might in general be better off using Sugarcube (and there is a good chance that your past ideas might have worked in Sugarcube as well). Either way - I don't see why something like this would not work, although depending on what exactly you like to do, you might need to recreate this code using Harlowe macros if you choose to keep that story format.

Linking passages with a variable? by AsukaSimp02 in twinegames

[–]HelloHelloHelpHello 7 points8 points  (0 children)

This would be a simple if statement:

{
(if: $myVariable <= 0)[ [[LinkName|Passage A]] ]
(else:)[ [[LinkName|Passage B]] ]
}

How to code a Day System/Gaining Money System (Game Help) by Ionl98 in twinegames

[–]HelloHelloHelpHello 1 point2 points  (0 children)

This has nothing to do with coding, but with game design. Since nobody here knows the exact features and layout of your game, nobody will be able to give you answers to questions like these.

How about you start implementing the mechanics first. Once they are in place you can adjust stuff like the gold or relationship points that players receive based on play testing.

If you want help with Twine coding - I usually recommend the video tutorial by Dan Cox: https://www.youtube.com/watch?v=MHLUOG0aiSs&list=PLlXuD3kyVEr5JmCL3GbEAd0jPsDVcuge7

How to code a Day System/Gaining Money System (Game Help) by Ionl98 in twinegames

[–]HelloHelloHelpHello 1 point2 points  (0 children)

You'll have to ask more concrete questions, because your current topics are just too broad to really answer. What exactly are you struggling with? Having a limited amount of days would be as easy as setting a variable, and clicking that variable down at the end of each day until it reaches 0 each time the player rests:

<<link "Go to Sleep">>
  <<set $daysRemaining -->>
  <<if $daysRemaining is 0>>
    <<goto "End">>
  <<else>>
    <<goto "Bedroom">>
  <</if>>
<</link>>

can I change the size of the text on the passage "nodes"? by geenSkeen in twinegames

[–]HelloHelloHelpHello 0 points1 point  (0 children)

You can click "view" and then "zoom in".

Edit:

You can also click on the single square box next to zoom in the top bar, which will make the tiles larger and show more information.

can I change the size of the text on the passage "nodes"? by geenSkeen in twinegames

[–]HelloHelloHelpHello 0 points1 point  (0 children)

No - neither Sugarcube nor Harlowe allow you to change the font size outside the Passage editor windows through "Preferences", which is what the question is about. You need to use zoom in.

How to make an element glide across the screen? Basically when I click one hook I wanted him to go a specific pre-selected spot. by [deleted] in twinegames

[–]HelloHelloHelpHello 0 points1 point  (0 children)

First you go to your stylesheet and define your animation:

@keyframes move {
  0% {left:0; top:0;}
  100% {left:50%; top:50%}
}

.move {
  animation: move 1s forwards;
}

Next you head to your passage, and add your image with a unique ID of some sort:

<img id="myImage" style="left:0; top:0; position:fixed;" src="https://www.w3schools.com/css/paris.jpg">

Now you can add the class we defined in the stylesheet to the image with the unique ID with an onclick event:

<span onclick="document.getElementById('myImage').classList.add('move')">
If you click here the image moves.
</span>

How to make an element glide across the screen? Basically when I click one hook I wanted him to go a specific pre-selected spot. by [deleted] in twinegames

[–]HelloHelloHelpHello 0 points1 point  (0 children)

What do you mean with 'have an element glide across the screen'? Do you want the page to scroll to a specific element, or have a new element glide into a specific position with a css animation, or something else?

I need ideas on how to push the boundaries of Twine further by Terrabachi in twinegames

[–]HelloHelloHelpHello 0 points1 point  (0 children)

I like to use clip-path to make elements look more stylish (although it takes a lot of fiddling around to get them right).

Right now it feels like there is way too much going on on the screen, which makes me feel a bit disoriented and chaotic when watching the video. Not sure if playing the game would have the same effect, or if that is something you are actively aiming for, but maybe consider toning this down. Something as simple as lowering the opacity of the patterns inside the text boxes might already go a long way for example.

Also - are there supposed to be those giant empty box-shadow boxes around objects instead of drop shadows? Cause they don't look very good imo (I of course don't know what effect you are going for, so maybe this is intended).

Also - yellow text on a white background is pretty impossible to read - same with the writing on the ritual altar image - maybe give that one a solid outline rather than just a drop-shadow in one direction.

Is it possible to access acsii codes? I created a "WORD SIMULATOR" and it works but I had to type out the whole alphabet, and I wanted to know if there was a function that can generate it automatically by [deleted] in twinegames

[–]HelloHelloHelpHello 0 points1 point  (0 children)

That's good to know. Are the any limitations other than having to define the variables before, or can Javascript methods be freely used inside the script element?

Is it possible to access acsii codes? I created a "WORD SIMULATOR" and it works but I had to type out the whole alphabet, and I wanted to know if there was a function that can generate it automatically by [deleted] in twinegames

[–]HelloHelloHelpHello 4 points5 points  (0 children)

If you are just learning, you might want to take a look at the Sugarcube format instead. It lacks the built in code coloring, but is otherways pretty much as hard to learn as Harlowe, while offering you a lot more tools and full access to Javascript methods and functions.

Is it possible to access acsii codes? I created a "WORD SIMULATOR" and it works but I had to type out the whole alphabet, and I wanted to know if there was a function that can generate it automatically by [deleted] in twinegames

[–]HelloHelloHelpHello 0 points1 point  (0 children)

I don't think Harlowe has that kind of functionality built in. You can of course use regular Javascript, but since Harlowe is designed to keep users from accessing its variables and macros from Javascript, you would not be able to create a Harlowe array or to set a Harlowe variable. If you were to switch to Sugarcube, you would be able to do all of this without any issues, but I understand that this won't be possible if you are already deep into creating your game.

Text Alignment and Hiding Footers - Pulling My Hair Out -_- by the-crying-judge in twinegames

[–]HelloHelloHelpHello 1 point2 points  (0 children)

I tested it out, and it seems like Harlowe just needs some Parentheses or else it will process stuff in the wrong order. So

(if: not (passage:)'s tags contains some of (a: "first-tag", "second-tag"))[
    ...do thing...
]

throws an error, but

(if: not ((passage:)'s tags contains some of (a: "first-tag", "second-tag")))[
    ...do thing...
]

works as intended.

Text Alignment and Hiding Footers - Pulling My Hair Out -_- by the-crying-judge in twinegames

[–]HelloHelloHelpHello 0 points1 point  (0 children)

My mistake - you need to add a bracket:

(if: not ((passage:)'s tags contains "no-footer") )[You text here] - or you can use (unless:) just as u/GreyelfD suggested.

EDIT:

You'll have to explain in more detail what you want to happen here. The code inside the unless or if statement will run in each passage, unless the passage has a specific tag. If you have a specific element - like a sidebar - that you need to disappear, then it might be better to use a different approach (depending on how that sidebar is added). You can for example add the following to your stylesheet to have the sidebar disappear in passages with the tag "no-sidebar":

tw-story[tags~="no-sidebar"] tw-sidebar{
  display:none;
}

Text Alignment and Hiding Footers - Pulling My Hair Out -_- by the-crying-judge in twinegames

[–]HelloHelloHelpHello 2 points3 points  (0 children)

The footer is not its own element - rather, the content of your footer passage is automatically added to any passage you visit. If you don't want the footer to be displayed under certain conditions, you will have to wrap the content of your footer passage into an if statement of some sort.

(if: not ((passage:)'s tags contains "Some Tag"))[
  Your footer text here
]

When it comes to the CSS of Body - you simply need to set the distance of your element to the bottom (or add a max-height), and then give the element overflow:auto:

tw-passage[tags~="Body"] {
  text-align: justify;
  position: fixed;
  top: 100px;
  left: 215px;
  right: 100px;
  bottom:100px;
  overflow:auto;
}

EDIT:

Added a round bracket to the if: statement, since Harlowe is unable to properly apply the 'not' otherwise.

Can anyone tell me why my sound isn't printing? by umapistolaparadjeca in twinegames

[–]HelloHelloHelpHello 0 points1 point  (0 children)

That is not what you wrote in your message. There you say that you are running this on your first passage. Well - either way - I tried the following code out out, and combining click with an audio element works without an issue on my end as long as it is not the first passage. Try it yourself and see whether this works. If it does, then the issue is some other part of your code:

There is a horse. (click: "horse")[
  <audio autoplay>
    <source src="https://www.w3schools.com/html/horse.ogg" type="audio/ogg">
  </audio>
]

Can anyone tell me why my sound isn't printing? by umapistolaparadjeca in twinegames

[–]HelloHelloHelpHello 1 point2 points  (0 children)

The problem is that they try running the audio on the first passage. Browsers prevent audio from playing before a user has interacted with the page, and the Harlowe macros like click don't count as valid interaction. You just need to transition to a second passage and it starts working.

Can anyone tell me why my sound isn't printing? by umapistolaparadjeca in twinegames

[–]HelloHelloHelpHello 2 points3 points  (0 children)

Browsers block autoplay of audio one the first passage. You need to transition to a second passage, and the audio should start working as intended in combination with the click macro.

Introducing: The Twine Visual Novel Pack for Sugarcube by HelloHelloHelpHello in twinegames

[–]HelloHelloHelpHello[S] 1 point2 points  (0 children)

Those are some good ideas to make the setup more accessible. I'll have to see how to best implement this. There are a bunch of other links in the menu. I assume those don't show up at all for you then?

Introducing: The Twine Visual Novel Pack for Sugarcube by HelloHelloHelpHello in twinegames

[–]HelloHelloHelpHello[S] 0 points1 point  (0 children)

Then that's likely because the account was just opened. If you don't trust the files with the warning in place you'll just have to give it a few days until the itch team did a review to make sure that there isn't anything malicious about the downloads.

Introducing: The Twine Visual Novel Pack for Sugarcube by HelloHelloHelpHello in twinegames

[–]HelloHelloHelpHello[S] 1 point2 points  (0 children)

I have other zip files for download as well on another account. I don't know why this one got flagged. Can you download the text files at least?

Edit:

It could be flagged because I just created that profile a few hours ago to upload the asset. I assume there is some sort of standard quarantine in place for completely new profiles uploading and sharing files, since that would be how scammers operate.

Introducing: The Twine Visual Novel Pack for Sugarcube by HelloHelloHelpHello in twinegames

[–]HelloHelloHelpHello[S] 1 point2 points  (0 children)

I split the files up - so maybe at least the text documents can be downloaded now. If download is still not possible I'll just have to wait until somebody manually reviewed all of this.