Discuss Scratch

JadeTide
Scratcher
3 posts

Text Typing System

Please Read Before Responding!
Hi, I'm looking to create a typing system so when character talk, it looks like their dialogue is being typed out letter by letter.
I'm looking for the same effects in the dialogue as this project: https://scratch.mit.edu/projects/1296278979/

I understand that you need to utilize clones and create variables for what your going to say, and where it is, but can someone explain it in depth to me?

Thanks everyone
NMario84
Scratcher
1000+ posts

Text Typing System

There are some advanced ways like using the individual letters as sprite assets. But I'll give you the “basic” idea of it to get you started.

when this sprite clicked
start sound (meow v)
write [Testing 123]
wait until <key (any v) pressed?>
write [Hello pal, what do you want?]

define write (input) // Leave blank -----> [_] Run without screen refresh
set [number v] to (1)
set [says v] to []
repeat (length of (input))
if <not <(letter (number) of (input)) = [ ]>> then // That blank area is a space..
start sound (Pop v)
end
set [says v] to (join (says) (letter (number) of (input)) )
change [number v] by (1)
say (says)
wait (0.01) seconds
end
JadeTide
Scratcher
3 posts

Text Typing System

Thanks! I figured it out.
10goto10
Scratcher
1000+ posts

Text Typing System

I always like pointing out Scratch Team tutorials and examples since they tend to be straight forward and commented and you can easily experiment with it. https://scratch.mit.edu/projects/985124543
NMario84
Scratcher
1000+ posts

Text Typing System

Yeah, even Scratch Wiki seems to have an article about making the typewriter effect as well.

https://en.scratch-wiki.info/wiki/How_to_Make_a_Typewriter_Effect

Powered by DjangoBB