#First line of text types instantly while others type gradually

20 messages · Page 1 of 1 (latest)

viscid fern
#

notes: i'm using a 2+ part tutorial on this and have followed everything to the letter and doubled checked things.
what i want to happen: all text appearing gradually with a typewriter effect, and to instantly write when clicked once.
what is currently happening: the first line of text appears instantly despite having not clicked to instantly show the text
what i have done to try to solve the problem: i've checked if it's an issue of each frame counting as a click but that doesn't seem to be the issue, i've also done what comments on the video have suggested after having the same issue and set the text boxes to be on the same depth or have one lower than the other when generating the text.

i'm not sure what parts of my code are relevant, but i'll include a few screenshots of what might help!

here is the video i'm using, from the beginning up to about 11 minutes: https://www.youtube.com/watch?v=6Bzj7GdSkJI

After doing a bit of setup in part 1, this video focuses on implementing the branching dialog and the support systems that make it work. If you're having issues, always remember to check back over the video carefully and double-check your work!

Support me and these videos on Patreon! https://www.patreon.com/peytonburnham
My tweets: https://twit...

▶ Play video
#

drawing the text

#

also the depth on this is set to draw at -9999

#

the bit that controlls each individual item that can be clicked on to show text (i think)

#

adding the text

#

im not sure what i should and shouldn't include sorry D:

ebon arch
#

@viscid fern hey I can look through your issue and solve it.

#

But I'd suggest just dropping what you have. Don't watch the tutorial.

fast bluff
#

this is a classic order issue which the video you watched neglected to mention

#

imagine the order things happen. you can click to create a textbox, click to go to the next page, and click to skip typing

#

all three actions are looking for the same input

#

so what happens when you click to create a textbox?

#

well, you have clicked, and the textbox is checking for a click

#

and you have clicked! after all, you just did so to spawn it

#

so the textbox must immediately skip typing, since you gave it the input to do so on the frame you spawned it

#

the solution is to ignore input in the textbox when it spawns for a moment

ebon arch
#

Thanks mimpy.

fast bluff
#

my video series, which sahaun linked, covers this in the first part’s “preventing order errors” chapter

#

and the solution there can be integrated into peyton’s code with minimal fuss, too, if you’re not interested in refactoring everything